Implementations of the functions dplyr::rename() and dplyr::rename_with() that can be used to rename the variables of the cell statistic data.frame.

rename*Df() changes the names of individual variables using new_name = old_name syntax. rename*DfWith() renames variables with a function specified in argument .fn.

renameStatsDf(object, ...)

renameStatsDfWith(object, ...)

Arguments

object

A valid cypro object.

...

Input for function dplyr::rename_with(). This includes the arguments .fn and .cols.

Value

An updated version of the input cypro-object.

Details

Renaming the statistic data.frame affects all slots of the cypro object that refer to statistic variables (correlation analysis, variable sets etc.). All are renamed according to the input.

Use getStatVariableNames() to check if renaming resulted in the desired output.

Note

Make sure not to rename protected variables. Use the function protectedVariables() to obtain variable names that must not be changed and must not be added. Doing so will result in erroneous analysis results as many functions rely on these variables to carry specific meaning.