I've used the read_shape()
function from the tmaptools
package to import shapefiles many times successfully, but I've now encountered a strange error.
For some shapefiles the read_shape()
command yields message:
"Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Layer not found"
For other shapefiles, I have no problem at all. Here is an example of an open data shapefile for which I am getting this error: https://opendata.arcgis.com/datasets/3605212dc7f0477cacb4cca884487e3d_0.zip?outSR=%7B%22wkid%22%3A32054%2C%22latestWkid%22%3A32054%7D
I believe the error may be related to the tmap package because I am able to open the shapefiles in question with no issues in QGIS. I'm running the current versions of RStudio, tmap, and tmaptools.
Any ideas?