首页 > 解决方案 > 从 github 下载和/或导入 R 数据

问题描述

我想从 pslmData 下载和/或导入plist.RData。我在 R 中使用了以下命令

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

引发以下错误:

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

然后我使用下面给出的方法得到以下错误:

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

这给出了以下错误:

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 

我想知道如何下载和/或导入这些数据。谢谢

标签: rgithubimportdownload

解决方案


推荐阅读