I'm trying to import shapefiles into R but receiving errors. I'm using rgdal package and doing the following:
x <- readOGR(".", "SNP Basefile")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Cannot open layer
I used dsn="." since I had placed the shapefile in the current working directory. "SNP Basefile.shp" is the shapefile I'm trying to import.