\name{matrixIndex-class} \docType{class} \alias{matrixIndex-class} \alias{[,matrixIndex,ANY,ANY,ANY-method} \alias{[[,matrixIndex,numeric,missing-method} \alias{allNA,matrixIndex-method} \alias{anyNA,matrixIndex-method} \alias{coerce,matrixIndex,vectorIndex-method} \alias{dim,matrixIndex-method} \alias{dimnames,matrixIndex-method} \alias{length,matrixIndex-method} \alias{names,matrixIndex-method} \alias{setDimNames,matrixIndex-method} \alias{setNames,matrixIndex-method} \title{Class "matrixIndex", index class representing a set of row and column subscripts for a matrix } \description{ Objects of class \code{"matrixIndex"} represent subscripts corresponding to a submatrix of some matrix of a given size. Like the \code{"vectorIndex"} subclasses, this is a class for internal use. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("matrixIndex", row, col, origdim, Names)}. } \section{Slots}{ \describe{ \item{\code{row}:}{Object of class \code{"vectorIndex"}, the row subscript. } \item{\code{col}:}{Object of class \code{"vectorIndex"}, the column subscript. } \item{\code{origdim}:}{Object of class \code{"integer"}, the dimension of the full matrix. } \item{\code{Names}:}{Object of class \code{"vectorNamesType"}, names for the submatrix elements when the submatrix is treated as vectors. } } } \section{Extends}{ Class \code{"externalVector"}, directly. } \section{Methods}{ Signature components for the methods are: \tabular{ll}{ x \tab The class "allIndex"\cr scalar \tab Length one positive "integer"\cr i \tab The class "ANY"\cr j \tab The class "ANY"\cr drop \tab The class "logical"\cr value \tab The class "ANY"\cr .Object \tab The class "allIndex"\cr } \describe{ \item{x[i, j, drop=FALSE]}{ Create another object of cloass \code{matrixIndex} with same \code{origdims} represents a further submatrix of the full matrix. If \code{drop} is \code{TRUE} and at least one of the dimensions of the answer is \code{1}, the answer is an object of class \code{"vectorIndex"} instead. } \item{x[[i]]}{ Get the subscript representing the indices for dimension \code{i}. } \item{dim(x)}{ Get the dimension of \code{x}. } \item{dimnames(x)}{ Get the dimnames of \code{x}. } \item{length(x)}{ Get the length of \code{x} considered as a vector. This is same as \code{prod(dim(x))}. } \item{names(x)}{ Get the names of \code{x}. } \item{setDimNames(x, value)}{ Set the dimnames of \code{x} and return the modified \code{x}. } \item{setNames(x, value)}{ Set the names of \code{x} and return the modified \code{x}. } \item{as(x, "vectorIndex")}{ Coerce x to an object of class "vectorIndex". } } } \seealso{ \code{\link{vectorIndex-class}} for the class of row and column subscripts. } \keyword{classes}