powered by
Some discussion and examples can be found here: https://winvector.github.io/replyr/articles/FluidData.html.
buildPivotControlTable(d, columnToTakeKeysFrom, columnToTakeValuesFrom, ..., prefix = columnToTakeKeysFrom, sep = NULL)
data to scan for new column names
character name of column build new column names from.
character name of column to get values from.
not used, force later args to be by name
column name prefix (only used when sep is not NULL)
separator to build complex column names.
control table
https://github.com/WinVector/cdata, moveValuesToRows, moveValuesToColumns, moveValuesToRowsQ, moveValuesToColumnsQ
moveValuesToRows
moveValuesToColumns
moveValuesToRowsQ
moveValuesToColumnsQ
# NOT RUN { d <- data.frame(measType = c("wt", "ht"), measValue = c(150, 6), stringsAsFactors = FALSE) buildPivotControlTable(d, 'measType', 'measValue', sep='_') # }
Run the code above in your browser using DataLab