Learn R Programming

splusTimeDate (version 2.5.8)

groupVec: groupVec Constructor

Description

Constructor function for groupVec class objects.

Usage

groupVec(names, classes, columns)

Value

returns a new groupVec object constructed from the arguments, or an empty one if no arguments are supplied.

Arguments

names

the column names for the object. The function can be called with no arguments, but if it is called with any arguments, names must be supplied.

classes

the column classes for the object. If not supplied, it is initialized as ANY, replicated to the length of names.

columns

the list for column data. If not supplied, it is initialized to new(class) for each class in classes.

Details

This function creates a new groupVec object, putting the names (if supplied) into the names slot, the classes (if supplied) into the classes slot, and the columns (if supplied) into the columns slot.

See Also

groupVec

Examples

Run this code
groupVec() 
groupVec(c("my.nums", "my.chars"), c("numeric", "character")) 
groupVec(c("my.nums", "my.chars"), c("numeric", "character"), 
	  list(c(1, 2, 3), c("a", "b", "c"))) 

Run the code above in your browser using DataLab