Learn R Programming

nlme (version 3.1-163)

Matrix.pdMat: Assign Matrix to a pdMat or pdBlocked Object

Description

The positive-definite matrix represented by object is replaced by value. If the original matrix had row and/or column names, the corresponding names for value can either be NULL, or a permutation of the original names.

Usage

# S3 method for pdMat
matrix(object) <- value
# S3 method for pdBlocked
matrix(object) <- value

Value

a pdMat or pdBlocked object similar to object, but with its coefficients modified to produce the matrix in

value.

Arguments

object

an object inheriting from class "pdMat", representing a positive definite matrix.

value

a matrix with the new values to be assigned to the positive-definite matrix represented by object. Must have the same dimensions as as.matrix(object).

Author

José Pinheiro and Douglas Bates bates@stat.wisc.edu

See Also

pdMat, "matrix<-"

Examples

Run this code
class(pd1 <- pdSymm(diag(3))) # "pdSymm" "pdMat"
matrix(pd1) <- diag(1:3)
pd1

Run the code above in your browser using DataLab