# NOT RUN {
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")
# }
Run the code above in your browser using DataLab