View source: R/combineVariables.R
combineVariables | R Documentation |
This typically converts the data from a wide to a long format. For each variable, a subset of interest based on a condition can be specified.
combineVariables(
data,
paramsList,
newVar,
labelVars = NULL,
fctTest = "==",
includeAll = FALSE,
labelAll = "Any"
)
data |
Data.frame with dataset to consider for the summary table. |
paramsList |
nested list of parameters,
specifying how the records of interest should be selected.
|
newVar |
String with name of new variable to construct. |
labelVars |
(optional) Named character vector with label for
the row, column variable(s) or variable(s) to summarize. |
fctTest |
Default function to use to compare |
includeAll |
Logical, if TRUE (FALSE by default) include also the entire data as an additional subgroup. |
labelAll |
String of group label for the entire data in case |
Data.frame with records from data
extracted based on
the different conditions specified in paramsList
.
This data.frame contains an additional variable
(labelled based on newVar
) mentioning the
specific condition for which the record was extracted
(based label
, labelExtra
, labelVars
).
This variable is a factor whose levels are ordered based on the order
of the condition specified in paramsList
.
Laure Cougnaud
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.