UserGuide BioStat Prime Help

Recode Variables

Recodes one or more a numeric vector, character vector, or factors according to recode specifications. User can store the results by overwriting existing variables, specifying new variable names to store recoded values or choosing to store the recoded values in new variables with a suitable prefix or suffix. the prefix or suffix will be applied to the existing variable name.

Recode Variables

Arguments

colNames

A character vector containing one or more variables in the dataset to recode

newColNames

A character vector containing the names of the new columns.

OldNewVals

A character string of recode specifications in the form oldval1,newval1, oldval2,newval2

NewCol

A Boolean indicating whether recoded values are stored in new variables (TRUE) or existing variables are overwritten(FALSE).

prefixOrSuffix

Specify if user wants to store the recoded values in new variables prefixed or suffixed with the name user specifies. Enter prefix or suffix.

prefixOrSuffixString

Enter a string to use as a prefix or suffix to the existing variable name. Recoded values will be stored in these variables.

dataSetNameOrIndex

The dataset/dataframe name

Last modified: 31 July 2025