Replace outliers in a CausataData object.

Description

Outliers are replaced in a CausataData object, and the limits are stored so that they can be re-applied when scoring.

Usage

1
2
3
## S3 method for class 'CausataData'
ReplaceOutliers(this, variableName, 
  lowerLimit=NULL, upperLimit=NULL, ...)

Arguments

this

A CausataData object.

variableName

The name of the variable within the causataData object that will have outliers replaced.

lowerLimit

See ReplaceOutliers.

upperLimit

See ReplaceOutliers.

...

Extra unused arguments.

Value

Returns a CausataData object.

Author(s)

Justin Hemann <support@causata.com>

See Also

CausataData, CausataVariable, ReplaceOutliers.

Examples

1
2
3
4
5
6
7
8
df <- data.frame(variable1__All.Past=c(1,2,3,4,1000))
# create CausataData object
causataData <- CausataData(df, rep(0,nrow(df)))
# max is 1000 before outliers are replaced
max(causataData$df$variable1__All.Past) 
causataData <- ReplaceOutliers(causataData, 'variable1__All.Past', upperLimit=4)
# now max is 4 after outliers are replaced
max(causataData$df$variable1__All.Past) 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.