1
我試圖讀取包含從GitHub一個dput
要旨:讀dput()從GitHub要旨成R
library(RCurl)
data <- getURL("https://gist.githubusercontent.com/aronlindberg/848b8efef154d0e7fdb4/raw/5bf4bb864cc4c1db0f66da1be85515b4fa19bf6b/pull_lists")
pull_lists <- dget(textConnection(data))
這產生:
Error: '\U' used without hex digits in character string starting ""@@ -1,7 +1,9 @@
module ActionDispatch
module Http
module URL
- # Returns the complete \U"
我認爲這是一個Ruby
錯誤消息而不是R錯誤。現在考慮這個:
data <- getURL("https://gist.githubusercontent.com/aronlindberg/b6b934b39e3c3378c3b2/raw/9b1efe9340c5b1c8acfdc90741260d1d554b2af0/data")
pull_lists2 <- dget(textConnection(data))
這似乎工作正常。前者的要點相當大,1.7mb。難道這就是爲什麼我不能從Github上讀取它。如果不是,爲什麼?
你看過'devtools'包中的'source_gist()'函數嗎?而且要明確一點,只有getURL調用纔會出現這個錯誤?或者你在「數據」變量中獲得數據? – MrFlick 2015-02-09 20:05:28
@MrFlick:我試過'source_gist(「https://gist.github.com/aronlindberg/b6b934b39e3c3378c3b2」)'應該加載與我的方法一起工作的第二個要點。但是,對於'source_gist()',這似乎不起作用:'錯誤:在gist中找不到R文件 – histelheim 2015-02-09 20:31:06