0

Trying to plot a vector file, packages installed tidyverse, ggplot2

ggplot() +  geom_sf(data = aoi_boundary_HARV, size = 3, color = "black", fill = "cyan1") + ggtitle("AOI Boundary Plot") +  coord_sf()

Error: could not find function geom_sf

yes sf package was installed same problems

2.2.1 do that means my r studio is an old version and should install the most recent one or something else

I had to do installr for an update

now %>% and error message no applicable method for 'filter_' applied to an object of class "c('SpatialLinesDataFrame', 'SpatialLines', 'Spatial', 'SpatialLinesNULL')"

julia
  • 21
  • 5
  • 2
    Did you install and load `sf`? It isn't part of the official `tidyverse`, I believe. Try `install.packages("sf")` – Gregor Thomas Nov 12 '19 at 03:41
  • What version of the ggplot2 library are you using? (check with `packageVersion('ggplot2')`.) `geom_sf` was added in 3.0. – drf Nov 12 '19 at 03:50
  • If 2.2.1 is your `ggplot2` version number, then you need to update that package. You may need to restart R to do it, and then run `install.packages('ggplot2')` to get the current version. – Gregor Thomas Nov 12 '19 at 04:15

0 Answers0