CheckNumeric: INTERNAL FUNCTION: Check values of a numeric vector or matrix...

View source: R/ImputeRegressionMulti.R

CheckNumericR Documentation

INTERNAL FUNCTION: Check values of a numeric vector or matrix according to limits.

Description

Possibly changed data is retuned

Usage

CheckNumeric(
  x,
  minLimit = -Inf,
  maxLimit = Inf,
  setNA = TRUE,
  allowMissing = TRUE,
  allowInf = FALSE,
  varName = "Variable"
)

Arguments

x

numeric vector or matrix

minLimit

lower limit

maxLimit

upper limit

setNA

When TRUE values outside limits are set to NA instead of error

allowMissing

When FALSE missing values cause error

allowInf

When FALSE -Inf and Inf always considered outside limits

varName

String used in warning or error message

Value

x is retuned, possibly changed

Examples

CheckNumeric(-1:10,minLimit=0,varName="Hello")

statisticsnorway/Kostra documentation built on Nov. 2, 2024, 6:40 p.m.