Hi Abdoulaye Perhaps its helpful to
simplify the instruction so its easy to read in ordinary text.
The example that Jeffrey Hollister gives at
https://www.r-bloggers.com/things-i-forget-reading-a-shapefile-in-r-with-readogr/ is like this myShapeInR<-readOGR("C:/data","myShapeFile") where the shapefile is called myShapeFile.shp, and its in C:/data. If its in your current working directory (calling getwd() will tell you what your current working directory is) then you can use simply myShapeInR<-readOGR(".","myShapeFile") as the full stop "." is a symbol for the current directory. Hope that helps David
On 9/11/2019 2:47 am, Abdoulaye Sarr
wrote:
I am trying to read a shapefile using readOGR but keep getting error messages: map = readOGR(dsn=path.expand("/Volumes/DS2S/R_QGIS_codes//Data"),"indicator") Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Cannot open layerWhat could be causing the problem? sp 1.3-2 Thanks as [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo --
|
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo