wider | R Documentation |
Pivot data from long to wide format
wider( qnat, names_from = "code_stn", names_prefix = "stn_", values_from = "qnat" )
qnat |
a tibble with tidy data. Usually the output from import_qnat. |
names_from |
< If |
names_prefix |
String added to the start of every variable name. This is
particularly useful if |
values_from |
< If |
This almost a wrapper function of tidyr::pivot_wider()
.
a widen tibble version from
input data (qnat
). Each column will correspond to a time series of a
station. Default for variable names will be a string like qnat_{names_from}
. Most of the time the value of names_from is code_stn
or id
.
if(FALSE){ qnat <- import_qnat(NA_character_, complete = TRUE, add_stn_info = TRUE) str(qnat) qnat_wide <- wider(qnat) str(qnat_wide) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.