Ruby 将dput()gist从github读入R

Ruby 将dput()gist从github读入R,ruby,r,reproducible-research,Ruby,R,Reproducible Research,我正在试图从Github阅读包含dput的要点: library(RCurl) data <- getURL("https://gist.githubusercontent.com/aronlindberg/848b8efef154d0e7fdb4/raw/5bf4bb864cc4c1db0f66da1be85515b4fa19bf6b/pull_lists") pull_lists <- dget(textConnection(data)) 我认为这是一个Ruby错误消息,而不是

我正在试图从Github阅读包含
dput
的要点:

library(RCurl)
data <- getURL("https://gist.githubusercontent.com/aronlindberg/848b8efef154d0e7fdb4/raw/5bf4bb864cc4c1db0f66da1be85515b4fa19bf6b/pull_lists")
pull_lists <- dget(textConnection(data))
我认为这是一个
Ruby
错误消息,而不是R错误。现在考虑这个问题:

data <- getURL("https://gist.githubusercontent.com/aronlindberg/b6b934b39e3c3378c3b2/raw/9b1efe9340c5b1c8acfdc90741260d1d554b2af0/data")
 pull_lists2 <- dget(textConnection(data))

data您创建的gist中没有
.R
文件,因为
pull\u列表
没有扩展名。我转向并添加了扩展。现在可以获取要点并将其保存为值

library("devtools")
pull_lists <- source_gist("a7b157cec3b9259fc5d1")
库(“devtools”)

拉列表您看过
devtools
包中的
source\u gist()
函数了吗?需要澄清的是,您仅仅通过调用
getURL
就得到了这个错误?或者你的“数据”变量中有数据吗?@MrFlick:我试过
source\u-gist(“https://gist.github.com/aronlindberg/b6b934b39e3c3378c3b2“
这应该加载第二个要点,它与我的方法一起工作。但是,对于
source\u gist()
这似乎不起作用:
错误:在gist中找不到R文件
library("devtools")
pull_lists <- source_gist("a7b157cec3b9259fc5d1")