[R] Have you used RGoogleDocs and RGoogleData?

Adrian Dragulescu adrian_d at eskimo.com
Thu Dec 10 16:38:10 CET 2009


I will try to have something in place by Monday to allow you to download 
a specific sheet not default to the first.  I will let you know.

Adrian

On Thu, 10 Dec 2009, Farrel Buchinsky wrote:

> Thank you Adrian. Your response was very informative.
>
> ?downloadDocument filled me with excitement untill I read, "If you try to
> download a spreadsheet with multiple worksheets into a 'csv' or 'tsv'
> format, only the first worksheet will be downloaded."
>
> So now there is a convenient fast way to read data under two circumstances
>
>   1. if the spreadsheet has been
> published<http://blog.revolution-computing.com/2009/09/how-to-use-a-google-spreadsheet-as-data-in-r.html>
>   2. if one only wants the first sheet (RGoogleData's downloadDocument()).
>
>
> Farrel Buchinsky
> Google Voice Tel: (412) 567-7870
>
> Sent from Pittsburgh, Pennsylvania, United States
>
> On Thu, Dec 10, 2009 at 09:32, Adrian Dragulescu <adrian_d at eskimo.com>wrote:
>
>>
>> Farrel,
>>
>> Please read the manuals.  On the RGoogleData package page you can read:
>> "The package provides R access to Google services through the Google
>> supported Java API.
>>
>> [...]
>>
>> A package with very similar functionality is maintained by Duncan Temple
>> Lang at \url{http://www.omegahat.org/RGoogleDocs/}.  The approach taken
>> there is to use \code{RCurl} and \code{XML} to interact with the lower
>> level Google HTML protocol.  You should check it out too."
>>
>> Regarding the questions you have about speed.  Google spreadsheets is
>> labeled Labs, mabye there are performance issues on Google side.  The
>> approach for both RGoogleDocs and RGoogleData is to make requests to the
>> Google servers and parse the XML results.  RGoogleDocs parses using a C
>> library, RGoogleData uses a Java library.  Going through the Java interface
>> is an extra step, so that might explain the speed difference.
>>
>> Check ?downloadDocument if you want to download the entire document.  It
>> should be fast.  You can load it into R after that.
>>
>> Best,
>> Adrian
>>
>>
>>
>> On Wed, 9 Dec 2009, Farrel Buchinsky wrote:
>>
>>  Both of these applications fulfill a great need of mine: to read data
>>> directly from google spreadsheets that are private to myself and one or
>>> two
>>> collaborators. Thanks to the authors. I had been using RGoogleDocs for the
>>> about 6 months (maybe more) but have had to stop using it in the past
>>> month
>>> since for some reason that I do not understand it no longer reads google
>>> spreadsheets. I loved it. Its loss depresses me. I started using
>>> RGoogleData
>>> which works.
>>>
>>> I have noticed that both packages read data slowly. RGoogleData is much
>>> slower than RGoogleDocs used to be. Both seem a lot slower than if one
>>> manually downloaded a google spreadsheet as a csv and then used read.csv
>>> function - but then I would not be able to use scripts and execute without
>>> finding and futzing.
>>>
>>> Can anyone explain in English why these packages read slower than a csv
>>> download?
>>> Can anyone explain what the core difference is between the two packages?
>>> Can anyone share their experience with reading Google data straight into
>>> R?
>>>
>>> Farrel Buchinsky
>>> Google Voice Tel: (412) 567-7870
>>>
>>> Sent from Pittsburgh, Pennsylvania, United States
>>>
>>>
>




More information about the R-help mailing list