Description Usage Arguments Details Value Author(s) Examples
Replaces missing values in an array of numeric values.
1 2 3 4 5 6 7 | ## S3 method for class 'numeric'
CleanNaFromContinuous(x, method="median", replacement.value=NULL,
return.replacement=FALSE, ...)
## S3 method for class 'POSIXct'
CleanNaFromContinuous(x, method="median", replacement.value=NULL,
return.replacement=FALSE, ...)
|
x |
An array of numerical (continuous) values and missing values. |
method |
Sets the method used to replace missing values. Valid values are "median" and "mean". |
replacement.value |
If this argument is not NULL then missing values will be replaced with the value provided instead of a mean or median. |
return.replacement |
If FALSE then an array is returned with missing values replaced. If TRUE then a list is returned with the array and the replacement value. |
... |
Unused arguments for other methods. |
The default behavior is that missing numeric values are replaced with the median.
Returns an array with missing values replaced. Optionally a list can be returned with the array and the replacement value.
Justin Hemann <support@causata.com>
1 2 3 | # numeric, median is 2, mean is 3.7
x <- c(NA, 1,1.5,2,3,11)
CleanNaFromContinuous(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.