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)


Search within the Causata package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.