imputeY: Impute NAs and Inf in y

View source: R/handleNAs.R

imputeYR Documentation

Impute NAs and Inf in y

Description

Impute NAs and Inf in y

Usage

imputeY(x, y, control)

Arguments

x

The x values from which y was calculated

y

The vector of numerics from which NA/Inf values should be removed

control

spot control list. See also spotControl.

Value

y The imputed vector w/o NA and w/o Inf values.

Examples


x <- matrix(runif(10), ncol=2, nrow=5)
y <- funSphere(x)
y[1] <- NA
control <- spotControl(dimension = 2)
# no imputation function, i.e, w/o imputation
imputeY(x=x, y=y, control=control)
# with imputation
control$yImputation$handleNAsMethod <- handleNAsKrigingWorst
y <- imputeY(x=x, y=y, control=control)
# no imputation required:
imputeY(x=x, y=y, control=control)


SPOT documentation built on June 26, 2022, 1:06 a.m.