CleanNaFromFactorCausataData: Given a factor in a CausataData object, this replaces missing...

Description Usage Arguments Value Author(s) See Also 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 'CausataData'
CleanNaFromFactor(x, variableName=NULL, replacement="BLANK", ...) 

Arguments

x

An object from CausataData.

variableName

If a name is supplied then the variable matching the name will have CleanNaFromFactor applied. If no name is provided then CleanNaFromFactor is applied to every factor in causataData.

replacement

Levels with missing values will be replaced with this string.

...

Unused arguments for other methods.

Value

Returns a CausataData object with the missing value replacements recorded.

Author(s)

Justin Hemann <[email protected]>

See Also

CleanNaFromFactor, CausataData.

Examples

1
2
3
df <- data.frame(f1__AP=factor(c("a","b",NA)), f2__AP=factor(c("x","y",NA)))
causataData <- CausataData(df, rep(0,nrow(df)))
causataData <- CleanNaFromFactor(causataData)

Causata documentation built on May 29, 2017, 4:40 p.m.