groupVec
Extended Class Validation
length
<= 1, for use in validation checks.
groupVecNonVec(object, exceptSlots)
T
if the slots in the object are atomic or not
vector
objects, excluding
the slots in
exceptSlots
, and a descriptive string if this
is not true.
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 that it has
length
<= 1.
setClass("myclass", representation("groupVec", a = "numeric")) obj <- new("myclass") groupVecNonVec(obj) obj@a <- 1:5 groupVecNonVec(obj) groupVecNonVec(obj, "a")