3
我需要通過R在Google電子表格文檔中添加新行。我知道如何使用Curl讀取R中的電子表格,但是我不知道是否有可能從R插入新行到谷歌電子表格。在谷歌電子表格中使用R插入行
這是一個谷歌的電子表格
google_ss <- function(gid = NA, key = NA)
{
if (is.na(gid)) {stop("\nWorksheetnumber (gid) is missing\n")}
if (is.na(key)) {stop("\nDocumentkey (key) is missing\n")}
require(RCurl)
url <- getURL(paste("https://docs.google.com/spreadsheet/pub?key=", key,
"&single=true&gid=", gid, "&output=csv", sep = ""),
cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
read.csv(textConnection(url), header = T, sep = ",")
}
讀取行的代碼,但我不知道這是否是可以從R返回數據,谷歌電子表格
請向我們展示您已寫入的代碼。謝謝。 – SlowLearner
是http://www.omegahat.org/RGoogleDocs/有用嗎? –
是啊! @Ben Bolker我認爲這是我搜索的答案 – calejero