groupVecColumn | R Documentation |
groupVec
Class - Data Access
Accesses the columns of a groupVec
object.
groupVecColumn(object, col.name)
object |
the object to access. |
col.name |
the name of columns to access. |
The function finds the given column by comparing col.name
to the names
slot of object
, and then extracts the corresponding
vectors from the list in the columns
slot of object
.
You can use this function on the left side of an assignment to replace the given columns with new values.
If you replace one column, supply the value as a vector.
If you replace multiple columns, supply the values in a list.
The new data is coerced to the columns
class using
as
before the replacement, and the column lengths are checked.
returns the data in the given columns.
If only one column is supplied, the result is the column
If more than one name is supplied, the result is a list of columns.
groupVecData
, groupVecNames
, groupVecClasses
, groupVec
class.
obj <- new("groupVec") groupVecNames(obj) <- "colname1" groupVecColumn(obj, "colname1") <- c(1, 2, 3) groupVecColumn(obj, "colname1") #[1] 1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.