[R] Accessing data via url

moldovean mr.vrabie at gmail.com
Thu Sep 29 00:02:53 CEST 2011


hi
I think this already a closed topic since you figure it out yourself.
but you can always try to fetch data from Google docs (first make the
spreadsheet public) and then writing this snippet:


library(RCurl)
u="https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0As6HUAxhy0Q7dDB0bjh4T2RyS3pIQkdXdGc2U0ZZc3c&single=true&gid=0&output=csv"

content = getBinaryURL(u, ssl.verifypeer = FALSE)
tmp = tempfile()
write(rawToChar(content), file = tmp)
mydata<- read.csv(gzfile(tmp))
mydata

it works for me and hopefully it'll work nor newbies like me too :)

--
View this message in context: http://r.789695.n4.nabble.com/Accessing-data-via-url-tp3178094p3853451.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list