\HeaderA{[-methods}{Methods for "[": Extraction or Subsetting in Package 'Matrix'}{[.Rdash.methods}
\aliasA{[,denseMatrix,index,index,logical-method}{[-methods}{[,denseMatrix,index,index,logical.Rdash.method}
\aliasA{[,denseMatrix,index,missing,logical-method}{[-methods}{[,denseMatrix,index,missing,logical.Rdash.method}
\aliasA{[,denseMatrix,matrix,missing,ANY-method}{[-methods}{[,denseMatrix,matrix,missing,ANY.Rdash.method}
\aliasA{[,denseMatrix,missing,index,logical-method}{[-methods}{[,denseMatrix,missing,index,logical.Rdash.method}
\aliasA{[,diagonalMatrix,index,index,logical-method}{[-methods}{[,diagonalMatrix,index,index,logical.Rdash.method}
\aliasA{[,diagonalMatrix,index,missing,logical-method}{[-methods}{[,diagonalMatrix,index,missing,logical.Rdash.method}
\aliasA{[,diagonalMatrix,missing,index,logical-method}{[-methods}{[,diagonalMatrix,missing,index,logical.Rdash.method}
\aliasA{[,Matrix,ANY,ANY,ANY-method}{[-methods}{[,Matrix,ANY,ANY,ANY.Rdash.method}
\aliasA{[,Matrix,index,index,missing-method}{[-methods}{[,Matrix,index,index,missing.Rdash.method}
\aliasA{[,Matrix,index,missing,missing-method}{[-methods}{[,Matrix,index,missing,missing.Rdash.method}
\aliasA{[,Matrix,lMatrix,missing,ANY-method}{[-methods}{[,Matrix,lMatrix,missing,ANY.Rdash.method}
\aliasA{[,Matrix,logical,missing,ANY-method}{[-methods}{[,Matrix,logical,missing,ANY.Rdash.method}
\aliasA{[,Matrix,matrix,missing,ANY-method}{[-methods}{[,Matrix,matrix,missing,ANY.Rdash.method}
\aliasA{[,Matrix,missing,index,missing-method}{[-methods}{[,Matrix,missing,index,missing.Rdash.method}
\aliasA{[,Matrix,missing,missing,ANY-method}{[-methods}{[,Matrix,missing,missing,ANY.Rdash.method}
\aliasA{[,sparseMatrix,index,index,logical-method}{[-methods}{[,sparseMatrix,index,index,logical.Rdash.method}
\aliasA{[,sparseMatrix,index,missing,logical-method}{[-methods}{[,sparseMatrix,index,missing,logical.Rdash.method}
\aliasA{[,sparseMatrix,missing,index,logical-method}{[-methods}{[,sparseMatrix,missing,index,logical.Rdash.method}
\aliasA{[,TsparseMatrix,index,index,logical-method}{[-methods}{[,TsparseMatrix,index,index,logical.Rdash.method}
\aliasA{[,TsparseMatrix,index,missing,logical-method}{[-methods}{[,TsparseMatrix,index,missing,logical.Rdash.method}
\aliasA{[,TsparseMatrix,missing,index,logical-method}{[-methods}{[,TsparseMatrix,missing,index,logical.Rdash.method}
\keyword{methods}{[-methods}
\keyword{array}{[-methods}
\begin{Description}\relax
Methods for \code{"["}, i.e., extraction or subsetting mostly of
matrices, in package \pkg{Matrix}.
\end{Description}
\begin{Section}{Methods}
There are more than these:
\describe{
\item[x = "Matrix", i = "missing", j = "missing", drop= "ANY"] ... 
\item[x = "Matrix", i = "numeric", j = "missing", drop= "missing"] ... 
\item[x = "Matrix", i = "missing", j = "numeric", drop= "missing"] ... 

\item[x = "dsparseMatrix", i = "missing", j = "numeric", drop= "logical"] ... 
\item[x = "dsparseMatrix", i = "numeric", j = "missing", drop= "logical"] ... 
\item[x = "dsparseMatrix", i = "numeric", j = "numeric", drop= "logical"] ... 
}
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{[<--methods}{[<.Rdash..Rdash.methods}} for sub\emph{assign}ment to \code{"Matrix"}
objects.
\code{\LinkA{Extract}{Extract}} about the standard extraction.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
str(m <- Matrix(round(rnorm(7*4),2), nrow = 7))
stopifnot(identical(m, m[]))
m[2, 3]   # simple number
m[2, 3:4] # simple numeric of length 2
m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix'
## rows or columns only:
m[1,]     # first row, as simple numeric vector
m[,1:2]   # sub matrix of first two columns

showMethods("[", inherited = FALSE)
\end{ExampleCode}
\end{Examples}

