[R] Reading from Google Docs

Farrel Buchinsky fjbuch at gmail.com
Tue Dec 16 02:03:38 CET 2008


I took the liberty of replacing all the xmlParse in auth.R with
xmlTreeParse. Alas still no joy.
getDocs(con)
Error in UseMethod("xpathApply") : no applicable method for "xpathApply"
Farrel Buchinsky
GrandCentral Tel: (412) 567-7870




On Mon, Dec 15, 2008 at 20:00, Farrel Buchinsky <fjbuch at gmail.com> wrote:
> I have loaded the XML package. Should the function not be xmlTreeParse?
>
> Look at this
>> library(XML)
>
>> help(xmlParse)
> No documentation for 'xmlParse' in specified packages and libraries:
> you could try 'help.search("xmlParse")'
>
>> help.search("xmlParse")
> Help files with alias or concept or title matching 'xmlParse' using
> fuzzy matching:
>
>
>
> supportsExpat(XML)      Determines which native XML parsers are being
>                        used.
> xmlEventHandler(XML)    Default handlers for the SAX-style event XML
>                        parser
> xmlParent(XML)          Get parent node of XMLInternalNode or ancestor
>                        nodes
> xmlStopParser(XML)      Terminate an XML parser
> xmlTreeParse(XML)       XML Parser
>
>
>
> Farrel Buchinsky
> GrandCentral Tel: (412) 567-7870
>
>
>
>
> On Mon, Dec 15, 2008 at 19:56, Duncan Temple Lang
> <duncan at wald.ucdavis.edu> wrote:
>>
>>
>> Farrel Buchinsky wrote:
>>>
>>> When I run>getDocs(con)
>>>
>>> I get this error:
>>> Error in getDocs(con) : could not find function "xmlParse"
>>>
>>> Where should xmlParse be coming from?
>>
>> From the XML package.
>>
>>
>>>
>>> You had asked where I got the idea to enter "con$getDocs()". I got it
>>> from run.html. But now that you bring the words "In the future, we
>>> might" to my attention I can see that I should not have tried it.
>>>
>>>
>>>
>>> Farrel Buchinsky
>>> GrandCentral Tel: (412) 567-7870
>>>
>>>
>>>
>>>
>>> On Mon, Dec 15, 2008 at 19:28, Duncan Temple Lang
>>> <duncan at wald.ucdavis.edu> wrote:
>>>>
>>>> Farrel Buchinsky wrote:
>>>>>
>>>>> Great. I have previously installed 7zip.
>>>>> It worked well. I installed the files. See below (way below).
>>>>>
>>>>> When I  entered >library(RGoogleDocs)
>>>>> it did not run.
>>>>> So I just ran auth.R
>>>>> Then I was able to run
>>>>> auth <-getGoogleAuth("fjbuch at gmail.com","mypassword")
>>>>> con = getConnection(auth)
>>>>> con$getDocs()
>>>>> all worked until this point when I got
>>>>> Error in con$getDocs : $ operator not defined for this S4 class
>>>>>>
>>>>>> str(con)
>>>>>
>>>>> Formal class 'GoogleDocsConnection' [package ""] with 0 slots
>>>>>  list()
>>>>
>>>> If you use
>>>>
>>>>  getDocs(con)
>>>>
>>>> it should work, assuming auth and con are appropriate.
>>>>
>>>> Where did you see that
>>>>
>>>>
>>>>  con$getDocs()
>>>>
>>>> should work?
>>>> In the documentation file run.xml, there is the line
>>>>
>>>> "
>>>> In the future, we might provide an interface that avoids this such
>>>>
>>>> as
>>>>
>>>>  con$getDocs()
>>>> ...
>>>> "
>>>>
>>>> So, as it says, it is in the future.
>>>>
>>>>  D.
>>>>
>>>>
>>>>> I have just seen Prof Brian Ripley's correspondence. I had installed
>>>>> RCurl and XML from the Tinn-R "R controlling:packages" button. It
>>>>> appears to me that I need to check out R-admin manual.
>>>>> Is there a simple generic r script that I could run to determine if my
>>>>> RCurl and XML are running properly?
>>>>>
>>>>>
>>>>> ================================================================================
>>>>> C:\Program Files\R\R-2.7.2\library\RGoogleDocs\
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> inst                                          <DIR>
>>>>> 12/15/2008 17:27:57
>>>>> R                                             <DIR>
>>>>> 12/15/2008 17:27:57
>>>>> DESCRIPTION                                             777  9/24/2008
>>>>> 12:47:59
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> 1 file(s), 2 folder(s)                                  777 bytes
>>>>>
>>>>>
>>>>> ================================================================================
>>>>>
>>>>>
>>>>> ================================================================================
>>>>> C:\Program Files\R\R-2.7.2\library\RGoogleDocs\inst\
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> doc                                           <DIR>
>>>>> 12/15/2008 17:27:57
>>>>> sampleDocs                                    <DIR>
>>>>> 12/15/2008 17:44:07
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> 0 file(s), 2 folder(s)                                    0 bytes
>>>>>
>>>>>
>>>>> ================================================================================
>>>>>
>>>>>
>>>>> ================================================================================
>>>>> C:\Program Files\R\R-2.7.2\library\RGoogleDocs\inst\doc\
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> basics.html                                           5,867  9/24/2008
>>>>> 11:27:38
>>>>> basics.pdf                                            8,873  9/24/2008
>>>>> 11:30:51
>>>>> basics.xml                                            3,504  9/24/2008
>>>>> 11:27:34
>>>>> GNUmakefile                                              39  9/24/2008
>>>>> 11:24:44
>>>>> run.html                                             14,150  9/24/2008
>>>>> 12:46:41
>>>>> run.pdf                                              13,643  9/24/2008
>>>>> 12:44:39
>>>>> run.xml                                               9,257  9/24/2008
>>>>> 12:44:23
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> 7 file(s), 0 folder(s)                               55,333 bytes
>>>>>
>>>>>
>>>>> ================================================================================
>>>>>
>>>>>
>>>>> ================================================================================
>>>>> C:\Program Files\R\R-2.7.2\library\RGoogleDocs\inst\sampleDocs\
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> SampleDoc.doc                                        22,016  9/24/2008
>>>>> 12:44:23
>>>>> SampleSpreadsheet.xls                                17,408  9/24/2008
>>>>> 12:44:23
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> 2 file(s), 0 folder(s)                               39,424 bytes
>>>>>
>>>>>
>>>>> ================================================================================
>>>>>
>>>>>
>>>>> ================================================================================
>>>>> C:\Program Files\R\R-2.7.2\library\RGoogleDocs\R\
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> auth.R                                                8,183  9/24/2008
>>>>> 12:44:23
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> 1 file(s), 0 folder(s)                                8,183 bytes
>>>>>
>>>>>
>>>>> ================================================================================
>>>>>
>>>>> Farrel Buchinsky
>>>>> GrandCentral Tel: (412) 567-7870
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Dec 15, 2008 at 17:12, Gustavo Carvalho
>>>>> <gustavo.bio+R at gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> You can probably extract a .tar.gz using 7zip on Windows.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Gustavo.
>>>>>>
>>>>>> On Mon, Dec 15, 2008 at 8:07 PM, Farrel Buchinsky <fjbuch at gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I saw a thread from September 24 in which Duncan Temple Lang told us:
>>>>>>> - 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
>>>>>>>
>>>>>>> I could not find it by using Tinn-R or RGui's package install tool.
>>>>>>> Then when I went to the website I saw that package is only available
>>>>>>> as
>>>>>>> http://www.omegahat.org/RGoogleDocs/RGoogleDocs_0.1-0.tar.gz
>>>>>>>
>>>>>>> To my knowledge tar.gz is only for Linux. Does this mean that I cannot
>>>>>>> run it on a windows machine. Please tell me that there is a way to run
>>>>>>> it on a Windows machine.
>>>>>>>
>>>>>>> Farrel Buchinsky
>>>>>>> GrandCentral Tel: (412) 567-7870
>>>>>>>
>>>>>>> ______________________________________________
>>>>>>> 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.
>>>>>>>
>>>>> ______________________________________________
>>>>> 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.
>>
>



More information about the R-help mailing list