checkScalarType: Check for scalar type and class

checkScalarTypeR Documentation

Check for scalar type and class

Description

Tests the input for being a scalar value and checks the class of the scalar. This function is meant to be used internally for function input argument verification and typically will not be used otherwise.

Usage

checkScalarType(x, isType="numeric")

Arguments

x

an S-PLUS object.

isType

a character string defining the class of the object to be checked ala is(x,isType). Default: "numeric".

Value

no output is returned. If these tests fail, a stop condition is executed.

See Also

isVectorAtomic, checkVectorType, checkRange.

Examples

## expect no output from the following calls 
checkScalarType(pi,"numeric")
checkScalarType(100,"integer")
checkScalarType(letters[1],"character")

ifultools documentation built on July 14, 2022, 5:07 p.m.