groupVecNonVec | R Documentation |
groupVec
Extended Class Validation
Checks whether all slots of an object are either not
vectors or have length
<= 1 for use in validation checks.
groupVecNonVec(object, exceptSlots)
object |
the object whose slots are to be checked. |
exceptSlots |
if present, do not check these slots. |
The function loops through all the slots of the object, and for each
one checks to see that the data in it is either not a vector
class,
or if it is a vector
class, that it has length
<= 1.
returns TRUE
if the slots in the object are atomic or are not vector
objects (excluding
the slots in exceptSlots
); otherwise, returns a descriptive string.
groupVecExtValid
.
setClass("myclass", representation("groupVec", a = "numeric")) obj <- new("myclass") groupVecNonVec(obj) obj@a <- 1:5 groupVecNonVec(obj) groupVecNonVec(obj, "a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.