Lengths of Character Strings

DESCRIPTION:

Returns a vector or bdVector of the lengths of the character strings in the input.

USAGE:

nchar(x) 

REQUIRED ARGUMENTS:

x
any S-PLUS object.

VALUE:

a numeric vector or bdNumeric the same length as x, containing the number of characters in each of the elements of x.

NOTE:

x will be coerced to character, regardless of what it currently contains. Something will always happen, but in the case of non-atomic data, the result may be somewhat surprising.

SEE ALSO:

, , , .

EXAMPLES:

maxwid <- max(nchar(labels)) #max field needed