An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080923/c1ba3869/attachment.pl>
Modifying output to Google Docs
9 messages · Barry Rowlingson, Jim Lemon, Duncan Temple Lang +1 more
2008/9/23 Ajay ohri <ohri2007 at gmail.com>:
Hi List, Graphical output to PDF's ,RTF ,CSV is known through R. Can it be modified for outputting to Google Docs (which is basically uploaded files ,published to become html pages) Is there any package on this ?
Do you basically mean an R implementation of the Google Data APIs: http://code.google.com/apis/gdata/clientlibs.html or at least, that part of the API for dealing with google documents? http://code.google.com/apis/documents/developers_guide_protocol.html That would be very interesting... something like: library(google) g=google("username","password") d=data.frame(x=1:10,y=runif(10)) googleSendData(g, d) it might be easier to start by hooking into one of the other language client libs (java, python) instead of trying to write one in native R from the start. Although there's XML handling for R and the protocol appears to be based on that.... Something to do in those long winter nights ahead in the northern hemisphere perhaps... Barry
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080923/64dedce8/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080923/8e8c89c8/attachment.pl>
2008/9/23 Ajay ohri <ohri2007 at gmail.com>:
By outputting PDF directly to a Google Doc, it becomes light and portable for people to view and collaborate on projects in different parts of the world. If you extend this to Google spreadsheets this functionality is especially useful for financial reporting or marketing metrics reports or collaborative presentations to be made.
There's command-line tools (written in python, but probably in other languages elsewhere) to do this: http://code.google.com/p/gdatacopier/ their example is: ./gdoc-cp.py --username someone at gmail.com --import --local files/doc.txt --title "New Document" So all you need to do is call that from R with system() and wrap it up in some R functions. Barry
Ajay ohri wrote:
Hi List, Graphical output to PDF's ,RTF ,CSV is known through R. Can it be modified for outputting to Google Docs (which is basically uploaded files ,published to become html pages) Is there any package on this ?
Hi Ajay, Do you mean transforming R output into HTML? The R2HTML package does this, and the htmlize and R2html functions in the prettyR package do so as well. Jim
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080924/f0d1af77/attachment.pl>
The command line app is fine, although there are some potential security
issues or annoyances with a smooth work flow.
But it would be more flexible and powerful to do it directly in R.
And we don't need to know or program in C. The RCurl (https, getForm()
and postForm()) and XML packages provide all we need.
It took a couple of hours of reading the Google documentation,
designing and writing the R code and _testing_, but in relatively
few lines of code, the RGoogleDocs "package" enables an R user
to query, delete, download and upload documents to her Google account.
This was one of the motivations for developing the XML and RCurl
packages, i.e. to be able to quickly develop utilities in R to
communicate with Web "apps". So Ajay's suggestion was a nice
exercise to see if the packages do make it easy.
The package currently has no Rd files, but there is a brief "user's
guide". The package is available from
http://www.omegahat.org/RGoogleDocs
For binary files, you will want to grab a beta-version of RCurl
at http://www.omegahat.org/Prerelease/RCurl_0.91-0.tar.gz
D.
Barry Rowlingson wrote:
2008/9/23 Ajay ohri <ohri2007 at gmail.com>:
By outputting PDF directly to a Google Doc, it becomes light and portable for people to view and collaborate on projects in different parts of the world. If you extend this to Google spreadsheets this functionality is especially useful for financial reporting or marketing metrics reports or collaborative presentations to be made.
There's command-line tools (written in python, but probably in other languages elsewhere) to do this: http://code.google.com/p/gdatacopier/ their example is: ./gdoc-cp.py --username someone at gmail.com --import --local files/doc.txt --title "New Document" So all you need to do is call that from R with system() and wrap it up in some R functions. Barry
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080924/e6407549/attachment.pl>