\HeaderA{[<--methods}{Methods for "[<-" - Assigning to Subsets for 'Matrix'}{[<.Rdash..Rdash.methods}
\aliasA{Subassign-methods}{[<--methods}{Subassign.Rdash.methods}
\aliasA{[<-,CsparseMatrix,index,index,replValue-method}{[<--methods}{[<.Rdash.,CsparseMatrix,index,index,replValue.Rdash.method}
\aliasA{[<-,CsparseMatrix,index,index,sparseVector-method}{[<--methods}{[<.Rdash.,CsparseMatrix,index,index,sparseVector.Rdash.method}
\aliasA{[<-,CsparseMatrix,index,missing,replValue-method}{[<--methods}{[<.Rdash.,CsparseMatrix,index,missing,replValue.Rdash.method}
\aliasA{[<-,CsparseMatrix,index,missing,sparseVector-method}{[<--methods}{[<.Rdash.,CsparseMatrix,index,missing,sparseVector.Rdash.method}
\aliasA{[<-,CsparseMatrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,CsparseMatrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,CsparseMatrix,missing,index,replValue-method}{[<--methods}{[<.Rdash.,CsparseMatrix,missing,index,replValue.Rdash.method}
\aliasA{[<-,CsparseMatrix,missing,index,sparseVector-method}{[<--methods}{[<.Rdash.,CsparseMatrix,missing,index,sparseVector.Rdash.method}
\aliasA{[<-,denseMatrix,index,index,replValue-method}{[<--methods}{[<.Rdash.,denseMatrix,index,index,replValue.Rdash.method}
\aliasA{[<-,denseMatrix,index,missing,replValue-method}{[<--methods}{[<.Rdash.,denseMatrix,index,missing,replValue.Rdash.method}
\aliasA{[<-,denseMatrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,denseMatrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,denseMatrix,missing,index,replValue-method}{[<--methods}{[<.Rdash.,denseMatrix,missing,index,replValue.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,index,replValue-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,index,replValue.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,index,sparseMatrix-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,index,sparseMatrix.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,index,sparseVector-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,index,sparseVector.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,missing,replValue-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,missing,replValue.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,missing,sparseMatrix-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,missing,sparseMatrix.Rdash.method}
\aliasA{[<-,diagonalMatrix,index,missing,sparseVector-method}{[<--methods}{[<.Rdash.,diagonalMatrix,index,missing,sparseVector.Rdash.method}
\aliasA{[<-,diagonalMatrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,diagonalMatrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,diagonalMatrix,missing,index,replValue-method}{[<--methods}{[<.Rdash.,diagonalMatrix,missing,index,replValue.Rdash.method}
\aliasA{[<-,diagonalMatrix,missing,index,sparseMatrix-method}{[<--methods}{[<.Rdash.,diagonalMatrix,missing,index,sparseMatrix.Rdash.method}
\aliasA{[<-,diagonalMatrix,missing,index,sparseVector-method}{[<--methods}{[<.Rdash.,diagonalMatrix,missing,index,sparseVector.Rdash.method}
\aliasA{[<-,Matrix,ANY,ANY,ANY-method}{[<--methods}{[<.Rdash.,Matrix,ANY,ANY,ANY.Rdash.method}
\aliasA{[<-,Matrix,ANY,ANY,Matrix-method}{[<--methods}{[<.Rdash.,Matrix,ANY,ANY,Matrix.Rdash.method}
\aliasA{[<-,Matrix,ANY,ANY,matrix-method}{[<--methods}{[<.Rdash.,Matrix,ANY,ANY,matrix.Rdash.method}
\aliasA{[<-,Matrix,ANY,missing,Matrix-method}{[<--methods}{[<.Rdash.,Matrix,ANY,missing,Matrix.Rdash.method}
\aliasA{[<-,Matrix,ANY,missing,matrix-method}{[<--methods}{[<.Rdash.,Matrix,ANY,missing,matrix.Rdash.method}
\aliasA{[<-,Matrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,Matrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,Matrix,missing,ANY,Matrix-method}{[<--methods}{[<.Rdash.,Matrix,missing,ANY,Matrix.Rdash.method}
\aliasA{[<-,Matrix,missing,ANY,matrix-method}{[<--methods}{[<.Rdash.,Matrix,missing,ANY,matrix.Rdash.method}
\aliasA{[<-,Matrix,missing,missing,ANY-method}{[<--methods}{[<.Rdash.,Matrix,missing,missing,ANY.Rdash.method}
\aliasA{[<-,RsparseMatrix,index,index,replValue-method}{[<--methods}{[<.Rdash.,RsparseMatrix,index,index,replValue.Rdash.method}
\aliasA{[<-,RsparseMatrix,index,index,sparseVector-method}{[<--methods}{[<.Rdash.,RsparseMatrix,index,index,sparseVector.Rdash.method}
\aliasA{[<-,RsparseMatrix,index,missing,replValue-method}{[<--methods}{[<.Rdash.,RsparseMatrix,index,missing,replValue.Rdash.method}
\aliasA{[<-,RsparseMatrix,index,missing,sparseVector-method}{[<--methods}{[<.Rdash.,RsparseMatrix,index,missing,sparseVector.Rdash.method}
\aliasA{[<-,RsparseMatrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,RsparseMatrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,RsparseMatrix,missing,index,replValue-method}{[<--methods}{[<.Rdash.,RsparseMatrix,missing,index,replValue.Rdash.method}
\aliasA{[<-,RsparseMatrix,missing,index,sparseVector-method}{[<--methods}{[<.Rdash.,RsparseMatrix,missing,index,sparseVector.Rdash.method}
\aliasA{[<-,sparseMatrix,ANY,ANY,sparseMatrix-method}{[<--methods}{[<.Rdash.,sparseMatrix,ANY,ANY,sparseMatrix.Rdash.method}
\aliasA{[<-,sparseMatrix,ANY,missing,sparseMatrix-method}{[<--methods}{[<.Rdash.,sparseMatrix,ANY,missing,sparseMatrix.Rdash.method}
\aliasA{[<-,sparseMatrix,missing,ANY,sparseMatrix-method}{[<--methods}{[<.Rdash.,sparseMatrix,missing,ANY,sparseMatrix.Rdash.method}
\aliasA{[<-,TsparseMatrix,index,index,replValue-method}{[<--methods}{[<.Rdash.,TsparseMatrix,index,index,replValue.Rdash.method}
\aliasA{[<-,TsparseMatrix,index,index,sparseVector-method}{[<--methods}{[<.Rdash.,TsparseMatrix,index,index,sparseVector.Rdash.method}
\aliasA{[<-,TsparseMatrix,index,missing,replValue-method}{[<--methods}{[<.Rdash.,TsparseMatrix,index,missing,replValue.Rdash.method}
\aliasA{[<-,TsparseMatrix,index,missing,sparseVector-method}{[<--methods}{[<.Rdash.,TsparseMatrix,index,missing,sparseVector.Rdash.method}
\aliasA{[<-,TsparseMatrix,matrix,missing,replValue-method}{[<--methods}{[<.Rdash.,TsparseMatrix,matrix,missing,replValue.Rdash.method}
\aliasA{[<-,TsparseMatrix,missing,index,replValue-method}{[<--methods}{[<.Rdash.,TsparseMatrix,missing,index,replValue.Rdash.method}
\aliasA{[<-,TsparseMatrix,missing,index,sparseVector-method}{[<--methods}{[<.Rdash.,TsparseMatrix,missing,index,sparseVector.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", value= "ANY"] is currently a simple fallback method implementation which ensures
\dQuote{readable} error messages.
\item[x = "Matrix", i = "ANY", j = "ANY", value= "ANY"] currently
gives an error 

\item[x = "denseMatrix", i = "index", j = "missing", value= "numeric"] ... 
\item[x = "denseMatrix", i = "index", j = "index", value= "numeric"] ... 
\item[x = "denseMatrix", i = "missing", j = "index", value= "numeric"] ... 
}
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{[-methods}{[.Rdash.methods}} for subsetting \code{"Matrix"} objects; the
\code{\LinkA{index}{index.Rdash.class}} class;
\code{\LinkA{Extract}{Extract}} about the standard subset assignment (and extraction).
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
set.seed(101)
(a <- m <- Matrix(round(rnorm(7*4),2), nrow = 7))

a[] <- 2.2 # <<- replaces **every** entry
a
## as do these:
a[,] <- 3 ; a[TRUE,] <- 4

m[2, 3]  <- 3.14 # simple number
m[3, 3:4]<- 3:4  # simple numeric of length 2

## sub matrix assignment:
m[-(4:7), 3:4] <- cbind(1,2:4) #-> upper right corner of 'm'
m[3:5, 2:3] <- 0
m[6:7, 1:2] <- Diagonal(2)
m

## rows or columns only:
m[1,] <- 10
m[,2] <- 1:7
m[-(1:6), ] <- 3:0 # not the first 6 rows, i.e. only the 7th
as(m, "sparseMatrix")
\end{ExampleCode}
\end{Examples}

