readDoc             package:RGoogleDocs             R Documentation

_G_e_t _t_h_e _c_o_n_t_e_n_t_s _o_f _a _G_o_o_g_l_e _D_o_c_u_m_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     'getDocContent' fetches the contents of a Google Document.
     'readDoc' fetches and parses the document, assuming it is HTML or
     XML. For Presentation documents, i.e. slides/overheads, the result
     is the PDF content of the document returned as a raw vector with
     no intepretation. (See grImport if you really want to do something
     with it in R.)

_U_s_a_g_e:

     readDoc(doc, con)

_A_r_g_u_m_e_n_t_s:

     doc: the name of the document to be retrieved, or a GoogleDocument
          object obtained via a call to 'getDocs'.

     con: the authenticated connection to Google Docs.

_V_a_l_u_e:

     'getDocContent' returns a character string (vector of length 1).
     'readDoc' returns the parsed HTML or XML document as an 
     'XMLInternalDocument'. If the document is a presentation, the
     result is a PDF.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_S_e_e _A_l_s_o:

     'getDocs' 'getGoogleDocsConnection'

_E_x_a_m_p_l_e_s:

     if(exists("GoogleDocsPassword")) {
               # getGoogleDocsConnection("my login", "my password")

       con = getGoogleDocsConnection(names(GoogleDocsPassword), GoogleDocsPassword)
       getDoc("Many Parts", con)
       getDocContent("Many Parts", con)

       o = readDoc("Introduction to RGoogleDocs", con)

       docs = getDocs(con)
       readDoc(docs[[1]], con)
     }

