GoogleWorksheetRef-class     package:RGoogleDocs     R Documentation

_D_e_s_c_r_i_p_t_i_o_n _o_f _a _r_e_m_o_t_e _G_o_o_g_l_e _W_o_r_k_s_h_e_e_t

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

     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.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

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

_S_l_o_t_s:


     _t_i_t_l_e the name/title of the worksheet

     _d_i_m_s the number of rows and columns

     _u_r_l the URL of the document

     _l_i_s_t_f_e_e_d content feed URL for working with rows.

     _c_e_l_l_s_f_e_e_d content feed URL for working with the individual cells

     _c_o_n_n_e_c_t_i_o_n 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.

_M_e_t_h_o_d_s:


     [ 'signature(x = "GoogleWorksheetRef", i = "numeric", j =
          "numeric")':  syntactic sugar for retrieving subrows and
          columns of this matrix

     _d_i_m 'signature(x = "GoogleWorksheetRef")': get the dimensions
          (number of rows and columns) of this worksheet.

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

     Duncan Temple Lang

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

     'getWorksheets' 'addWorksheet'

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

     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)

