R: Check for vector type and class

checkVectorType {ifultools} | R Documentation

## Check for vector type and class

### Description

Tests the input for being a vector (as defined by the `isVectorAtomic` function and checks the class of the vector. This function is meant to be used internally for function input argument verification and typically will not be used otherwise.

### Usage

    checkVectorType(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`, `checkScalarType`, `checkRange`.

### Examples

    ## expect no output from the following calls
    checkVectorType(rnorm(1024),"numeric")
    checkVectorType(1:3,"integer")
    checkVectorType(letters,"character")

[Package ifultools version 2.0-4 Index]