GoogleWorksheetRef-class

0th

Percentile

Description of a remote Google Worksheet

This class describes a remote Google worksheet object which is a single sheet within a Google spreadsheet. The object has information about the location of the contents of the worksheet and also its dimensions at the time at which the information was computed by R. (It is possible that the worksheet has changed after this time.) We can use this object to get the contents of the worksheet and its dimension, etc.

We can also modify the contents of a worksheet using the common subset assignments in R, e.g. x[1, 1] <- 10, x[1:3, 4:9] <- 10, x[1:3,] <- 10, x[1:3,] <- 10, and x[,] <- 10.

The dim and getExtent functions can be applied to a worksheet. dim returns the number of rows and columns for the entire worksheet, be they empty or not. getExtent returns a 2 x 2 matrix with indicating the effective number of rows and columns. The two columns give the minimum and maximum indices for the rows and columns respectively.

Keywords
classes
Objects from the Class

Objects are created via calls to getWorksheets and addWorksheet and are very rarely

Slots

title
the name/title of the worksheet
dims
the number of rows and columns
url
the URL of the document
listfeed
content feed URL for working with rows.
cellsfeed
content feed URL for working with the individual cells
connection
the connection given as con in the call which is used to be able to return to the list/cells feed to get the contents without the need for a connection.
edit
the content feed URL for editing the document.

Methods

[
signature(x = "GoogleWorksheetRef", i = "numeric", j = "numeric"): syntactic sugar for retrieving subrows and columns of this matrix
dim
signature(x = "GoogleWorksheetRef"): get the dimensions (number of rows and columns) of this worksheet.

See Also

getWorksheets addWorksheet

Aliases
  • GoogleWorksheetRef-class
  • [,GoogleDocList,ANY,ANY-method
  • [,GoogleWorksheetRef,numeric,numeric-method
  • [,GoogleWorksheetRef,numeric,missing-method
  • [,GoogleWorksheetRef,missing,numeric-method
  • [,GoogleWorksheetRef,ANY,logical-method
  • [,GoogleWorksheetRef,ANY,missing-method
  • [,GoogleWorksheetRef,logical,ANY-method
  • [,GoogleWorksheetRef,missing,ANY-method
  • [,GoogleWorksheetRef,missing,missing-method
  • [<-,GoogleWorksheetRef,numeric,numeric-method
  • [<-,GoogleWorksheetRef,numeric,missing-method
  • [<-,GoogleWorksheetRef,missing,numeric-method
  • [<-,GoogleWorksheetRef,missing,missing-method
  • [<-,GoogleWorksheetRef,matrix,missing-method
  • getExtent
  • dim,GoogleWorksheetRef-method
Examples
showClass("GoogleWorksheetRef")

## Not run: 
# docs = getDocs(con)
# 
# book = addSpreadsheet(con, c(21, 12), "dummy")
# sh = addWorksheet(docs$mine4, con, title = "testing")
# 
# sh[,10, extent = 5] = letters[1:3]
# sh[,4, extent = c(2, 5)] = letters[1:3]
# sh[,8, extent = TRUE] = letters[1:3]
# sh[,9, extent = FALSE] = letters[1:3]
# ## End(Not run)
Documentation reproduced from package RGoogleDocs, version 0.7-0, License: BSD

Community examples

Looks like there are no examples yet.