Skip to content

Reading from Google Docs

6 messages · Charlie Sharpsteen, Farrel Buchinsky, Duncan Temple Lang

#
On Wed, Nov 25, 2009 at 12:02 PM, Farrel Buchinsky <fjbuch at gmail.com> wrote:
That explains the warning message.
Well, it's just a warning-- so it shouldn't be a show-stopper.  And
from what I see the warning is only referring to the package help
pages, which are available online.  It looks like the functionality of
the package should still work just fine if you don't want to bother
with a reinstall.
This shouldn't be extraordinarily difficult-- unfortunately Murphy's
Law does come into play sometimes.  But it should just be a matter of:

  install.packages( "RGoogleDocs", repos="http://www.omegahat.org/R",
type="source" )

And that's it for Linux, Mac OS or other UNIX-based system.  With
Windows you will first have to install the toolset available at:

 http://www.murdoch-sutherland.com/Rtools/

Grab the "Rtools210" installer as you are using R 2.10.x.  Install
using the "Package Authoring" option and make sure you check any
options that ask about modifying your PATH.

Good luck!

-Charlie
2 days later
#
Farrel Buchinsky wrote:
You are using a connection to the wise service (for worksheets)
to get the list of documents from the document service.

If you call getDocs() with an connection to writely, I
imagine it will succeed.

So you have a token, but it is for the wrong thing.
The first thing is to learn about debugging in R.
For example,

options(error = recover)

getDocs(sheets.con)

The error occurs and you are presented with a menu prompt that allows you
to select the call frame of interest. There is only one - getDocs().
Enter 1 <Return>.  Now you have an R prompt  that allows you to explore
the call frame.

 objects()

 body()


Take a look at status

  status


                    WWW-Authenticate
"GoogleLogin realm=\"http://www.google.com/accounts/ClientLogin\", service=\"writely\""
                                                                           Content-Type
                                                             "text/html; charset=UTF-8"
                                                                                   Date
                                                        "Sat, 28 Nov 2009 17:36:16 GMT"
                                                                                Expires
                                                        "Sat, 28 Nov 2009 17:36:16 GMT"
                                                                          Cache-Control
                                                                   "private, max-age=0"
                                                                 X-Content-Type-Options
                                                                              "nosniff"
                                                                       X-XSS-Protection
                                                                                    "0"
                                                                        X-Frame-Options
                                                                           "SAMEORIGIN"
                                                                                 Server
                                                                              "GFE/2.0"
                                                                      Transfer-Encoding
                                                                              "chunked"
                                                                                 status
                                                                                  "401"
                                                                          statusMessage
                                                                        "Token invalid"


This is the parsed header of the reply from the GoogleDocs server.

x contains the result of the query and it is an HTML document with the (same) error message.