Deprecated, please use moveValuesToColumns
or moveValuesToColumnsQ
.
replyr_moveValuesToColumns(data, columnToTakeKeysFrom, columnToTakeValuesFrom,
rowKeyColumns, ..., fill = NA, sep = NULL, maxcols = 100,
dosummarize = TRUE,
tempNameGenerator = makeTempNameGenerator("replyr_moveValuesToColumns"))
data.frame to work with.
character name of column build new column names from.
character name of column to get values from.
character array names columns that should be table keys.
force later arguments to bind by name
value to fill in missing values from original (both those that are originally explicitly NA, and those not present as rows).
character, if not null build composite column names as COLsepVALUE, use new columns names are just VALUE.
maximum number of values to expand to columns
logical, if TRUE finish the moveValuesToColumns by summarizing rows.
temp name generator produced by replyr::makeTempNameGenerator, used to record dplyr::compute() effects.
data item
Spread values found in columnToTakeValuesFrom
row groups as new columns labeled by columnToTakeKeysFrom
.
from nameForNewValueColumn.
This is denormalizing operation, or essentially a tidyr::spread
, dplyr::dcast
, or pivot.
Similar interface as in the cdata
package (though does not perform pre/post condition checks).
https://github.com/WinVector/cdata, moveValuesToRows
, moveValuesToColumns
, moveValuesToRowsQ
, moveValuesToColumnsQ
, replyr_moveValuesToRows
, replyr_moveValuesToColumns