Delete comment from: theBioBucket*
Kay, thanks a lot for this code -- very useful posting reproducible examples on SO! I've essentially copy/pasted what I think should be replaced in your code, but getting two errors. Wondering if you could perhaps comment on this:
Error in file(output, open = "wb") : cannot open the connection
In addition: Warning message:
In file(output, open = "wb") :
cannot open file 'VAR RENAME TEST.xlsx': Permission denied
Here's the full code I had:
## My test file is here: https://docs.google.com/file/d/0B1bNxpx4XS8dTG01Z3pvRjVYZHc/edit?
usp=sharing
dl_from_GoogleD <- function(output, key, format) {
require(RCurl)
bin <- getBinaryURL(paste0("https://docs.google.com/file/d/", key, "/edit?usp=", format),
ssl.verifypeer = FALSE)
con <- file(output, open = "wb")
writeBin(bin, con)
close(con)
message(noquote(paste(output, "read into", getwd())))
}
test <- dl_from_GoogleD(output = "VAR RENAME TEST.xlsx",
key = "0B1bNxpx4XS8dTG01Z3pvRjVYZHc",
format = ".xlsx")
sorry for the intensive question, but thanks in advance for any help you may have.
Oct 15, 2013, 2:34:03 AM
Posted to Download File from Google Drive/Docs Programmatically with R

