getPositions: get impute positions

View source: R/handleNAs.R

getPositionsR Documentation

get impute positions

Description

Determines positions in a vectors that fulfill criteria defined by a list of criteria, e.g., is.na.

Usage

getPositions(y, imputeCriteriaFuns = list(is.na, is.infinite, is.nan))

Arguments

y

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

imputeCriteriaFuns

list criteria functions specified via imputeCriteriaFuns in spotControl. Default: list(is.na, is.infinite, is.nan).

Value

p vector of positions that fulfill one of the criteria

Examples

imputeCriteriaFuns <- list(is.na, is.infinite, is.nan)
y <- c(1,2,Inf,4,NA,6)
p <- getPositions(y, imputeCriteriaFuns)

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