Engorgio - Spread Key-Value Pairs to Widen Data
engorgio.Rd
engorgio
spell expands your data frame, spreading key-value pairs across
multiple columns, thus making the dataset wider. It is akin to the magical
process of enlarging objects, but for data frames, using tidyr::pivot_wider()
.
This function is particularly useful when you want to transform long-format
data into a wide-format, making it easier to analyze and visualize.
Arguments
- data
A data frame or tibble that you wish to transform into a wider format.
- names_from
The column in
data
that contains the variable names which will be spread out across the new columns in the wider format.- values_from
The column in
data
that contains the values to fill the new columns created by spreadingnames_from
.- ...
Additional arguments passed on to
tidyr::pivot_wider()
.
Value
A wider data frame or tibble where key-value pairs specified by
names_from
and values_from
are spread across multiple columns, enlarging
the dataset horizontally.
See also
Other data transformation functions:
reducio()
,
transfiguro()