[R-sig-Geo] issue with readOGR

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Sat Nov 9 18:07:49 CET 2019


On Fri, 8 Nov 2019, Abdoulaye Sarr wrote:

> I am trying to read a shapefile using readOGR but keep getting error
> messages:
> map =
> readOGR(dsn=path.expand("/Volumes/DS2S/R_QGIS_codes//Data"),"indicator")
> Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv =
> use_iconv,  :
>  Cannot open layer

What is "/Volumes/DS2S/R_QGIS_codes//Data"? If a network drive, some OGR 
drivers are known not to work with them (or that used to be the case). 
Which OS/Platform is this? Is the repeated "//" correct? Can you see the 
file running list.files("/Volumes/DS2S/R_QGIS_codes//Data") ?

Roger

>
> What could be causing the problem? sp 1.3-2
>
> Thanks
> as
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list