Description Usage Arguments Value See Also Examples
Reshape data from the "cell feed", put it in a tbl_df
, and do type
conversion. By default, assuming we're working with the same cells,
gs_reshape_cellfeed
should return the same result as other read
functions. But when literal = FALSE
, something different happens: we
attempt to deliver cell contents free of any numeric formatting. Try this if
numeric formatting of literal values is causing numeric data to come in as
character, to be undesirably rounded, or to be otherwise mangled. Remember
you can also control type conversion by using ...
to provide arguments
to readr::type_convert
. See the
vignette("formulas-and-formatting")
for more details.
1 | gs_reshape_cellfeed(x, literal = TRUE, ..., verbose = TRUE)
|
x |
a data frame returned by |
literal |
logical, indicating whether to work only with literal values returned by the API or to consult alternate cell contents |
... |
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.
|
verbose |
logical; do you want informative messages? |
a data.frame
or, if dplyr
is loaded, a
tbl_df
Other data consumption functions: gs_read_cellfeed
,
gs_read_csv
,
gs_read_listfeed
, gs_read
,
gs_simplify_cellfeed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
gap_ss <- gs_gap() # register the Gapminder example sheet
gs_read_cellfeed(gap_ss, "Asia", range = cell_rows(1:4))
gs_reshape_cellfeed(gs_read_cellfeed(gap_ss, "Asia", range = cell_rows(1:4)))
gs_reshape_cellfeed(gs_read_cellfeed(gap_ss, "Asia",
range = cell_rows(2:4)),
col_names = FALSE)
gs_reshape_cellfeed(gs_read_cellfeed(gap_ss, "Asia",
range = cell_rows(2:4)),
col_names = paste0("yo", 1:6))
ff_ss <- gs_ff() # register example sheet with formulas and formatted nums
ff_cf <- gs_read_cellfeed(ff_ss)
gs_reshape_cellfeed(ff_cf) # almost all vars are character
gs_reshape_cellfeed(ff_cf, literal = FALSE) # more vars are numeric
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.