1

I would like to set up code to download and load an .rda directly into R. The following code does not work, but illustrates what I am trying to do:

githubURL <- "https://github.com/ropensci/historydata/blob/master/data/catholic_dioceses.rda"
load(url(githubURL))
download.file(githubURL,"D")
load("D")

Thanks for any thoughts on how to adjust this code.

coding_heart
  • 1,245
  • 3
  • 25
  • 46
  • OS X Yosemite (version 10.10.3) – coding_heart Jun 09 '15 at 12:19
  • I cannot understand what is the problem. Anyway when `dowload.file` with Mac os use the argument `method = "curl"`. This won't solve the problem now but in any case with https you cannot download without this argument. Anyway if you need that dataset you can just load the package of that repo and 'data(catholic_dioceses)' – SabDeM Jun 09 '15 at 13:13
  • 1
    @zx8754 without `method=curl` the file cannot be even downloaded because Mac OS need this method for https. – SabDeM Jun 09 '15 at 13:20
  • http://cran.r-project.org/web/packages/curl/vignettes/intro.html – user227710 Jun 09 '15 at 13:28

0 Answers0