Transform data from long to wide format.
This function converts formats with the stats::reshape
function.
transformData(data, transformations, verbose = FALSE, labelVars = NULL)
A data.frame in wide format.
Data.frame with input data to transform.
Transformations (or list of those) as a list with:
'type': String with type of transformation. Currently, only: 'pivot_wider' is available
extra parameters for the transformation, for:
'pivot_wider':
'varsID': Character vector with variable(s) of data
defining unique records in the wide format.
Corresponds to the idvar
parameter of the reshape
function.
'varPivot': String with unique variable of data
containing elements to pivot in different columns in the wide format
(used for column names).
Corresponds to the timevar
parameter of the reshape
function.
'varsValue': Character vector with variable(s) of data
used to fill the columns in the wide format.
Corresponds to the v.names
parameter of the reshape
function.
Logical, if TRUE (FALSE by default) progress messages are printed in the current console. For the visualizations, progress messages during download of subject-specific report are displayed in the browser console.
Named character vector containing variable labels.
Laure Cougnaud