renameStatsDf: Rename statistic variables

View source: R/rename-content.R

renameStatsDfR Documentation

Rename statistic variables

Description

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.

Usage

renameStatsDf(object, ...)

renameStatsDfWith(object, ...)

Arguments

object

A valid cypro object.

...

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

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.

Value

An updated version of the input cypro-object.

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.


theMILOlab/cypro documentation built on April 5, 2022, 2:03 a.m.