I'm using the selectFeatures function within the R package called mapedit. I want to be able to select all polygons that fall within (either wholly or partially) an area drawn using the tools in the mapedit viewer.
Using the following code from the (mapedit doc) the click mode works. However, when I change the mode to draw and then complete a drawing using any tool it produces the error below and the map is removed from the viewer and nothing is stored in the object (in this case selected2).
library(mapview)
library(mapedit)
library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
selected <- selectFeatures(nc, mode = 'click')
selected2 <- selectFeatures(nc, mode = 'draw')
Warning: Error in st_read.default: no st_read method available for objects of class json
Is there a step I'm missing?
Also, would someone with higher priveledges than me kindly create a r-mapedit tag?
I was able to solve the problem by updating from R v3.4.4 to R v3.5.0.