0

I want to download and/or import the plist.RData from pslmData. I used the following command in R

githubURL <- "https://github.com/myaseen208/pslmData/tree/master/PSLM13-14/plist.RData"
load(url(githubURL))

which throws the following error:

Error in load(url(githubURL)) : 
  the input does not start with a magic number compatible with loading from a connection

Then I used the following the method given here, got the following error:

library(repmis)
source_data("https://github.com/myaseen208/pslmData/tree/master/PSLM13-14/plist.RData?raw=True")

which gives the following error:

Downloading data from: https://github.com/myaseen208/pslmData/tree/master/PSLM13-14/plist.RData?raw=True 

SHA-1 hash of the downloaded data file is:
b1a116e10c224d3e37c34567e73fd632b355c301
Error in load(data, envir = envir, ...) : 
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘filebb24b83d1f5’ has magic number ''
  Use of save versions prior to 2 is deprecated 

I wonder how to download and/or import this data. Thanks

MYaseen208
  • 22,666
  • 37
  • 165
  • 309
  • 2
    Just use the download url: `githubURL <- "https://github.com/myaseen208/pslmData/raw/master/PSLM13-14/plist.RData"` – hannes101 Aug 13 '18 at 13:30
  • Thanks @hannes101 for useful comment. It works like a charm. Would appreciate if you change your comment to answer. Thanks – MYaseen208 Aug 13 '18 at 13:36
  • Linked post is not about RData file, but the issue is the same, we need to link to "raw" data file and not the webpage. – zx8754 Aug 13 '18 at 13:41

0 Answers0