handleNAsKrigingWorst | R Documentation |
Remove NAs from a vector by replacing them with a penalized Kriging-based expectation
handleNAsKrigingWorst( x, y, penaltyImputation = 3, imputeCriteriaFuns = list(is.na, is.infinite, is.nan) )
x |
The x values from which y was calculated |
y |
The vector of numerics from which the NAs should be removed |
penaltyImputation |
multiplier for sPredicted (penalty term). Default: |
imputeCriteriaFuns |
|
y The imputed vector w/o NA
and w/o Inf
values.
imputeCriteriaFuns <- list(is.na, is.infinite, is.nan) x <- matrix(runif(20), ncol = 2) y <- funSphere(x) y[3] <- NA y[5] <- Inf plot(y, type="b") print(y) y1 <- handleNAsKrigingWorst(x=x, y=y, imputeCriteriaFuns=imputeCriteriaFuns) print(y1) points(3, y1[3], type="b", col="red") points(5, y1[5], type="b", col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.