I downloaded a SHAPE file from here. I added to my working directory:
> list.files('/home/lucho/data/EnglandGIS/', pattern='\\.shp$')
[1] "england_gor_2011.shp"
> file.exists('/home/lucho/data/EnglandGIS/england_gor_2011.shp')
[1] TRUE
However, I cannot read it:
library("rgdal")
shape <- readOGR(dsn = path.expand("/home/lucho/data/EnglandGIS/england_gor_2011"), layer = "england_gor_2011")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
Cannot open file
The only other similar question with accepted answer is of not help. What is the problem? Is the data corrupted? How can I tell? (if you could download the data and try it yourself, that might be the best way)
I am using latest R with latest Rstudio, in Ubuntu 16.04.