RGoogleDocs (version 0.7-0)

moveToFolder: Move a document to a folder

Description

This function allows us to move a document, be it a spreadsheet, word processing document, presentation or folder, into a Google Docs folder on the repository.

Usage

moveToFolder(doc, to, con = if (is(doc,"GoogleDocumentDescription")) doc@connection else getGoogleDocsConnection())

Arguments

doc
the document (spreadsheet, word processing document, folder, presentation) to be moved. This should be a GoogleDocumentDescription, but can be a name.
to
the folder object of class GoogleFolder, or a name.
con
an authenticated connection to the Google API. See getGoogleDocsConnection.

Value

A GoogleFolder

References

http://code.google.com/apis/documents/docs/2.0/developers\_guide\_protocol.html

See Also

addFolder

Examples

Run this code
if(exists("GoogleDocsPassword")) {
  con = getGoogleDocsConnection()
  a = addFolder("A", con)
  b = addFolder("B", con)
  c = addFolder("C", con)

  moveToFolder(b, a, con)
  moveToFolder(c, a, con)

  f = addFolder(c("One", "Two", "Three"), con)
}

Run the code above in your browser using DataCamp Workspace