Closed benscarlson closed 5 years ago
I updated to the latest development version ggsn (0.5.1) and I get this error.
Error inst_geometry<-.data.frame(tmp, value = NULL) : inherits(value, "sfc") || is.character(value) is not TRUE
Error in
(
, value = NULL) : inherits(value, "sfc") || is.character(value) is not TRUE
The error is the same as the one described in this stack exchange post. It seems there is some issue with the line st_geometry(legend2) <- NULL.
https://stackoverflow.com/questions/55943227/new-error-when-fitting-a-ggsn-scale-bar-to-ggmap-object
Also, I believe that the sf library should be prefixed to the st_geometry call, so that users don't need to load sf library themselves. e.g. sf:st_geometry(legend2). After loading the sf library, I get the above message.
sf:st_geometry(legend2)
If version 0.5.2 solved the problem, close the issue please.
Problem fixed in 0.5.2. Thank you!
I updated to the latest development version ggsn (0.5.1) and I get this error.
Error in
st_geometry<-.data.frame(
tmp, value = NULL) : inherits(value, "sfc") || is.character(value) is not TRUE
The error is the same as the one described in this stack exchange post. It seems there is some issue with the line st_geometry(legend2) <- NULL.
https://stackoverflow.com/questions/55943227/new-error-when-fitting-a-ggsn-scale-bar-to-ggmap-object
Also, I believe that the sf library should be prefixed to the st_geometry call, so that users don't need to load sf library themselves. e.g.
sf:st_geometry(legend2)
. After loading the sf library, I get the above message.