as.nlevels: Transform a Class Factor Variable to Class Numeric

Description Usage Arguments

View source: R/as.nlevels_Function.R

Description

Transform a variable of class factor to class numeric by not changing the actual values of the variable. This is different to simply applying as.numeric; for example a factor variable with levels 0 & 1, will NOT be transformed to values 1 & 2 respectively but rather it will retain the original values.

Usage

1

Arguments

x

The vector or variable that needs to be transformed.


Ehsan-F/R-Mixtape documentation built on June 24, 2020, 12:22 a.m.