Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getVector.Arguments

Validates a vector


Description

Validates a vector by checking its length (number of elements).

Usage

## Static method (use this):
## Arguments$getVector(x, length=NULL, .name=NULL, ...)

## Don't use the below:
## S3 method for class 'Arguments'
getVector(static, x, length=NULL, .name=NULL, ...)

Arguments

x

A single vector.

length

A numeric vector of length two or more. If two, it is the minimum and maximum length of x. Otherwise, it is the set of possible lengths of x.

.name

A character string for name used in error messages.

...

Not used.

Value

Returns the same vector, if it is valid. Otherwise an exception is thrown.

Author(s)

Henrik Bengtsson

See Also

For more information see Arguments.


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.