SubscriptList {externalVector} | R Documentation |
SubscriptList takes a list of subscripts to a subset or subassign
operation and converts each subscript to an object belonging to the
virtual class vectorIndex
.
SubscriptList(subs, length.object, dim.object = NULL, names.object = NULL, dimnames.object = NULL, assign.operation = FALSE)
subs |
An object of class "list", elements are valid subscripts. |
length.object |
A scalar of class "integer", representing the length of the object being subsetted or subassigned. |
dim.object |
An object of class "integer" or NULL , the
dimension of the object. |
names.object |
An object belonging to class union "validNamesClass", the names of the object viewed as a vector. |
dimnames.object |
NULL or an object of class "list", each
of whose elements are objects belonging to class union "validNamesClass". |
assign.operation |
A scalar of class "logical", if TRUE
the subscripts are for a subasign operation, if FALSE ,
the subscripts are for a subset operation. |
An object of class "list" of same length as subs
with each
element a
Saikat DebRoy <saikat@stat.wisc.edu>
See class union vectorNamesType-class
for possible
subscripts which are matched against the names.object
or elements of
dimnames.object
.
Also see class union vectorIndex-class
for some other
possible subscripts and for all possible elements in the returned
list.
Finally, see [
for other subscripts that are valid.
subs <- alist(i= , j= ) subs$j <- 1:4 SubscriptList(subs, 15, c(3, 5)) SubscriptList(list(i=c("a", "c"), j=-2), 15, c(3, 5), dimnames=list(letters[1:3], LETTERS[1:5]))