pivot_wider_spec {tidyr} | R Documentation |
This is a low level interface to pivotting, inspired by the cdata package, that allows you to describe pivotting with a data frame.
pivot_wider_spec( data, spec, names_repair = "check_unique", id_cols = NULL, values_fill = NULL, values_fn = NULL ) build_wider_spec( data, names_from = name, values_from = value, names_prefix = "", names_sep = "_" )
data |
A data frame to pivot. |
names_repair |
What happen if the output has invalid column names?
The default, |
id_cols |
A set of columns that uniquely identifies each observation.
Defaults to all columns in |
values_fill |
Optionally, a named list specifying what each |
values_fn |
Optionally, a named list providing a function that will be
applied to the |
names_from |
A pair of arguments describing which column
(or columns) to get the name of the output column ( If |
values_from |
A pair of arguments describing which column
(or columns) to get the name of the output column ( If |
names_prefix |
String added to the start of every variable name. This is
particularly useful if |
names_sep |
If |