[R-sig-Geo] readOGR() with remote folders

Agustin Lobo alobolistas at gmail.com
Wed May 7 13:21:41 CEST 2014


Does anyone know if readOGR() can be used with remote files on remote folders?
The following does not work for me:
NWEur <- readOGR(dsn="http://www.wuala.com/aloboa/NWEur",layer="NWEur",stringsAsFactors=FALSE)
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding,
use_iconv = use_iconv) :
  Cannot open file

(note that you can paste the url into your browser and works and that
there is no https)

But actually even this example from
https://personality-project.org/r/r.guide.html
does not work for me:

datafilename <-
"http://personality-project.org/r/datasets/Maps.mixx.msq1.epi.bf.txt"
person.data  <- read.table(datafilename,header=TRUE)
Error in file(file, "rt") : cannot open the connection

I also need to specify method="curl" to get download.fiel()  to work:
download.file("https://dl.dropboxusercontent.com/u/3180464/NWEur.zip","NWEur.zip",method="curl")

so I do not know if I have an idiosynchratic web security ward or I'm
just not doing things right

Thanks
Agus



More information about the R-sig-Geo mailing list