Closed ramarty closed 1 year ago
us_sp <- getData('GADM', country='USA', level=2) dc_sp <- us_sp[us_sp$NAME_1 %in% "District of Columbia",]
r <- gt_make_raster_from_polygon(polygon = dc_sp, height = 2000, width = 2000, zoom = 15, webshot_delay = 20, google_key = google_key)
Error in v[cells, i] <- getValues(x[[i]]) : number of items to replace is not a multiple of replacement length In addition: Warning message: In st_centroid.sf(.) : st_centroid assumes attributes are constant over geometries of x
us_sp <- getData('GADM', country='USA', level=2) dc_sp <- us_sp[us_sp$NAME_1 %in% "District of Columbia",]
r <- gt_make_raster_from_polygon(polygon = dc_sp, height = 2000, width = 2000, zoom = 15, webshot_delay = 20, google_key = google_key)
Error in v[cells, i] <- getValues(x[[i]]) : number of items to replace is not a multiple of replacement length In addition: Warning message: In st_centroid.sf(.) : st_centroid assumes attributes are constant over geometries of x