trans_wide_to_tidy | R Documentation |
Essentially a wrapper for pivot_longer that works on both a single wide-shaped dataframe as well as a list of wide-shaped dataframe's
trans_wide_to_tidy(
wides,
data_cols = NA,
id_cols = NA,
names_to = "Well",
values_to = "Measurements",
values_to_numeric = TRUE,
...
)
wides |
A single wide-shaped dataframe, or a list of wide-shaped dataframe's |
data_cols , id_cols |
Specifies which columns have data vs are ID's
(in pivot_longer parlance). Each can be
a single vector (which will be applied for all
dataframes) or a list of vectors, with each
vector corresponding to the same-index dataframe
in Entries that are NA in the list will not be used If neither |
names_to , values_to |
Specifies the output column names created by
pivot_longer. Each can be provided
as vectors the same length as |
values_to_numeric |
logical indicating whether values will be coerced
to numeric. See below for when this may be
overridden by arguments passed in |
... |
Other arguments to be passed to pivot_longer
Note that including |
Pivoted longer dataframe (if wides
is a single dataframe)
or list of pivoted longer dataframes (if wides
is
a list of dataframes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.