CleanNaFromFactor: Replaces missing values in a factor.

Description Usage Arguments Value Author(s) Examples

Description

Missing values are replaced with the string "BLANK", or any other string supplied as an input.

Usage

1
2
## S3 method for class 'factor'
CleanNaFromFactor(x, replacement="BLANK", ...) 

Arguments

x

A factor that may contain missing values.

replacement

Levels with missing values will be replaced with this string.

...

Unused arguments for other methods.

Value

Returns a factor that matches the input factor except that missing values are replaced.

Author(s)

Justin Hemann <support@causata.com>

Examples

1
2
f <- as.factor(c("a","b","c",NA))
CleanNaFromFactor(f)

Causata documentation built on May 2, 2019, 3:26 a.m.