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

getCharacters.Arguments

Coerces to a character vector and validates


Description

Coerces to a character vector and validates.

Usage

## Static method (use this):
## Arguments$getCharacters(s, length=NULL, trim=FALSE, nchar=NULL, useNames=TRUE,
##   asGString=getOption("Arguments$getCharacters/args/asGString", TRUE), .name=NULL,
##   ...)

## Don't use the below:
## S3 method for class 'Arguments'
getCharacters(static, s, length=NULL, trim=FALSE, nchar=NULL, useNames=TRUE,
  asGString=getOption("Arguments$getCharacters/args/asGString", TRUE), .name=NULL, ...)

Arguments

s

A vector.

nchar

A numeric vector of length one or two. If one, the maximum number of characters ("length") in s. If two, the minimum and maximum length of s.

useNames

If TRUE, the 'names' attribute is preserved, otherwise it is dropped.

asGString

If TRUE, each string is treated as a GString.

.name

A character string for name used in error messages.

...

Not used.

Value

Returns a character vector, if it is valid. Otherwise an exception is thrown.

Missing values

If s contains missing values, and nchar is not NULL, then 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.