matrixIndex-class {externalVector}R Documentation

Class "matrixIndex", index class representing a set of row and column subscripts for a matrix

Description

Objects of class "matrixIndex" represent subscripts corresponding to a submatrix of some matrix of a given size. Like the "vectorIndex" subclasses, this is a class for internal use.

Objects from the Class

Objects can be created by calls of the form new("matrixIndex", row, col, origdim, Names).

Slots

row:
Object of class "vectorIndex", the row subscript.
col:
Object of class "vectorIndex", the column subscript.
origdim:
Object of class "integer", the dimension of the full matrix.
Names:
Object of class "vectorNamesType", names for the submatrix elements when the submatrix is treated as vectors.

Extends

Class "externalVector", directly.

Methods

Signature components for the methods are:

x The class "allIndex"
scalar Length one positive "integer"
i The class "ANY"
j The class "ANY"
drop The class "logical"
value The class "ANY"
.Object The class "allIndex"
x[i, j, drop=FALSE]
Create another object of cloass matrixIndex with same origdims represents a further submatrix of the full matrix. If drop is TRUE and at least one of the dimensions of the answer is 1, the answer is an object of class "vectorIndex" instead.
x[[i]]
Get the subscript representing the indices for dimension i.
dim(x)
Get the dimension of x.
dimnames(x)
Get the dimnames of x.
length(x)
Get the length of x considered as a vector. This is same as prod(dim(x)).
names(x)
Get the names of x.
setDimNames(x, value)
Set the dimnames of x and return the modified x.
setNames(x, value)
Set the names of x and return the modified x.
as(x, "vectorIndex")
Coerce x to an object of class "vectorIndex".

See Also

vectorIndex-class for the class of row and column subscripts.


[Package externalVector version 1.0.14 Index]