[R] Accessing data via url

Dieter Menne dieter.menne at menne-biomed.de
Fri Jan 7 09:24:19 CET 2011



John Kane-2 wrote:
> 
> #   Can anyone suggest why this works
> 
> datafilename <-
> "http://personality-project.org/r/datasets/maps.mixx.epi.bfi.data"
> person.data  <- read.table(datafilename,header=TRUE)
> 
> # but this does not?
> 
> dd <-
> "https://sites.google.com/site/jrkrideau/home/general-stores/trees.txt"
> treedata <- read.table(dd, header=TRUE)
> 
> ===================================================================
> 
> Error in file(file, "rt") : cannot open the connection
> 

Your original file is no longer there, but when I try RCurl with a png file
that is present, I get a certificate error:

Dieter

--------
library(RCurl)
sessionInfo()
dd <-
"https://sites.google.com/site/jrkrideau/home/general-stores/history.png"
x = getBinaryURL(dd)

-------------
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] RCurl_1.5-0.1  bitops_1.0-4.1

loaded via a namespace (and not attached):
[1] tools_2.12.1

> dd <-
> "https://sites.google.com/site/jrkrideau/home/general-stores/history.png"

> x = getBinaryURL(dd)
Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) : 
  SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed



-- 
View this message in context: http://r.789695.n4.nabble.com/Accessing-data-via-url-tp3178094p3178773.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list