I am trying to read a shapefile in R using the command:
rivnet <- readOGR(dsn = 'sa_riv_30s',layer = 'sa_riv_30s')
However, the '.shp' layer does not seem to be recognized by R. The layers present in the file directory include: shp.htm, shp.xml, .sbx, and .prj. I've tried restarting my computer, updating rgdal, using file.exist() to check and receive false. I can see it in the file directory on my computer, and I have read it in the past.
It is not just this shapefile that is not showing up. I have several shapefiles in my directory and can't read any of them in R.
dsn
argument anddriver = 'ESRI Shapefile'