Description Usage Arguments Details Value See Also Examples
This function consumes data via the "cell feed", which, as the name suggests, retrieves data cell by cell. Note that the output is a data frame with one row per cell. Consult the Google Sheets API documentation for more details about the cell feed.
1 2 |
ss |
a registered Google spreadsheet, i.e. a |
ws |
positive integer or character string specifying index or title, respectively, of the worksheet |
range |
a cell range, as described in |
... |
Optional arguments to control data download, parsing, and reshaping; for most purposes, the defaults should be fine. Anything that is not listed here will be silently ignored.
|
return_empty |
logical; indicates whether to return empty cells |
return_links |
logical; indicates whether to return the edit and self links (used internally in cell editing workflow) |
verbose |
logical; do you want informative messages? |
Use the range
argument to specify which cells you want to read. See
the examples and the help file for the cell
specification functions for various ways to limit consumption to, e.g., a
rectangle or certain columns. If range
is specified, the associated
cell limits will be checked for internal consistency and compliance with the
known extent of the worksheet. If no limits are provided, all cells will be
returned but consider that gs_read_csv
and
gs_read_listfeed
are much faster ways to consume all the data
from a rectangular worksheet.
Empty cells, even if "embedded" in a rectangular region of populated cells,
are not normally returned by the cell feed. This function won't return them
either when return_empty = FALSE
(default), but will if you set
return_empty = TRUE
.
a data.frame
or, if dplyr
is loaded, a
tbl_df
gs_reshape_cellfeed
or
gs_simplify_cellfeed
to perform reshaping or simplification,
respectively; gs_read
is a pre-made wrapper that combines
gs_read_cellfeed
and gs_reshape_cellfeed
Other data consumption functions: gs_read_csv
,
gs_read_listfeed
, gs_read
,
gs_reshape_cellfeed
,
gs_simplify_cellfeed
1 2 3 4 5 6 7 8 9 10 | ## Not run:
gap_ss <- gs_gap() # register the Gapminder example sheet
col_4_and_above <-
gs_read_cellfeed(gap_ss, ws = "Asia", range = cell_limits(c(NA, 4)))
col_4_and_above
gs_reshape_cellfeed(col_4_and_above)
gs_read_cellfeed(gap_ss, range = "A2:F3")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.