I cannot successfully read a shapefile in R.
I'm using Rstudio version 0.99.902
I have read several articles on readOGR errors that concern reading a shapefile.
My shapefile is error free, as it opens in qGIS. when I check prescence of file, file.exists returns TRUE yet I get a "Cannot open layer" error:
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = >>use_iconv, : Cannot open layer
Any advice?
Best Answer
It took me a bit to get this too.
You have to leave off the ".shp" extension as well as the last forward slash on the path.