[R-sig-Geo] Error when saving an sf (data) object to file as a shapefile
Lom Navanyo
|omn@v@@|@ @end|ng |rom gm@||@com
Sat Jun 20 12:28:36 CEST 2020
Dear Bede-Fazekas,
Thank you for the swift response.
I confirm that all key values in y (balance5) are in x (parcel1). I used
all.y=TRUE because y the IDs (key values in y) are actually a subset of x.
However, what I cannot confirm is if the key variables combination
c('PARCEL_ID','CAL_YEAR') match perfectly from the two data sets.
I therefore changed the merging as:
mergedparcel2 <- merge(parcel1, balance5, by=c('PARCEL_ID','CAL_YEAR'))
I still get the following error:
> st_write(mergedparcel2,"mergedparcel2.shp")
Writing layer `mergedparcel2' to data source `mergedparcel2.shp' using
driver `ESRI Shapefile'
Writing 4682 features with 204 fields and geometry type Multi Polygon.
Unknown field name `Act_Depthtwtr': updating a layer with improper field
name(s)?
Error in CPL_write_ogr(obj, dsn, layer, driver,
as.character(dataset_options), :
Write error
In addition: There were 21 warnings (use warnings() to see them)
-----------------
Lom
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list