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,
...
)Pivoted longer dataframe (if wides is a single dataframe)
or list of pivoted longer dataframes (if wides is
a list of dataframes)
A single wide-shaped dataframe, or a list of wide-shaped dataframe's
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 wides
Entries that are NA in the list will not be used
If neither data_cols nor id_cols are
specified, user must provide arguments to
pivot_longer via ... for at
least the cols argument and these arguments
provided via ... will be used for all
wides dataframe's
Specifies the output column names created by
pivot_longer. Each can be provided
as vectors the same length as wides
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 values_transform here will override the
behavior of values_to_numeric