[.pdMat | R Documentation |
This method function extracts sub-matrices from the positive-definite
matrix represented by x
.
## S3 method for class 'pdMat'
x[i, j, drop = TRUE]
## S3 replacement method for class 'pdMat'
x[i, j] <- value
x |
an object inheriting from class |
i, j |
optional subscripts applying respectively to the rows
and columns of the positive-definite matrix represented by
|
drop |
a logical value. If |
value |
a vector, or matrix, with the replacement values for the
relevant piece of the matrix represented by |
if i
and j
are identical, the returned value will be
pdMat
object with the same class as x
. Otherwise, the
returned value will be a matrix. In the case a single row (or column)
is selected, the returned value may be converted to a vector,
according to the rules above.
José Pinheiro and Douglas Bates bates@stat.wisc.edu
[
, pdMat
pd1 <- pdSymm(diag(3))
pd1[1, , drop = FALSE]
pd1[1:2, 1:2] <- 3 * diag(2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.