Jean V Adams wrote:
I'm using S-PLUS 6.1 for Windows Prof. Ed. Rel. 1, and the module S+ 6
SpatialStats for Windows. I get an error message, shown below, when I try
to access the function is.Hermitian() from the library Matrix. I see from
the release notes on-line that the Matrix library is missing from this
release. How can I access the Matrix library functions?
library(Matrix)
Problem in library(Matrix): No section "Matrix" in the library directory:
C:/PROGRAM FILES/INSIGHTFUL/splus61\library
Use traceback() to see the call stack
is.Hermitian(spatial.weights(W.CAR), tol=0)
Problem: Couldn't find a function definition for "is.Hermitian"
Use traceback() to see the call stack
As you have already determined, there is no `Matrix' library for S-PLUS
6.1. If all you need is `is.Hermitian' then you can get this from the R
`Matrix' package:
is.Hermitian <- function (x, tol = 0) {
Hermitian.test(x) <= tol
}
Hermitian.test <- function (x) {
if (!is.matrix(x) || (nrow(x) != ncol(x)))
return(Inf)
if (is.complex(x))
return(max(Mod(x - t(Conj(x)))))
max(x - t(x))
}
Sundar
|