groupVec Class - Data Access

DESCRIPTION:

Access a columns of a groupVec object.

USAGE:

groupVecColumn(object, col.name) 

REQUIRED ARGUMENTS:

object
object to access.
col.name
name of columns to access.

VALUE:

the data in the given columns. If only one column is supplied, the result will be the column; if more than one name is supplied, the result will be a list of columns. Can also be used as a replacement function, in which case if one column is replaced, the value should be supplied as a vector, and if multiple columns are replaced, they should be given in a list.

DETAILS:

The function finds the given column by comparing col.name to the .Data.names slot of object, and then extracts the corresponding vectors from the list in the .Data slot of object. This function can also be used on the left side of an assignment to replace the given columns with new values. If it is used in this way, the new data is coerced to the columns class using as before replacement, and the column lengths are checked.

SEE ALSO:

, , , class.

EXAMPLES:

obj <- new("groupVec") 
groupVecNames(obj) <- "colname1" 
groupVecColumn(obj, "colname1") <- c(1, 2, 3) 
groupVecColumn(obj, "colname1")