s-news
[Top] [All Lists]

Re: Accessing Matrix library with S+ 6.1 for windows

To: Jean V Adams <jean_adams@usgs.gov>
Subject: Re: Accessing Matrix library with S+ 6.1 for windows
From: Sundar Dorai-Raj <sundar.dorai-raj@pdf.com>
Date: Fri, 28 Feb 2003 10:31:06 -0600
Cc: s-news@wubios.wustl.edu
Organization: PDF Solutions, Inc.
References: <OF6086DA1A.7335FE85-ON05256CDB.005468EA@er.usgs.gov>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

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


<Prev in Thread] Current Thread [Next in Thread>