[R-SIG-Mac]A mac/win difference in R1.4.0
Peter Macdonald
pdmmac@mcmail.cis.mcmaster.ca
Sat, 12 Jan 2002 20:24:08 -0500 (EST)
Can anyone give me insight on this or suggest a better way? Thanks!
On the Mac I can write
invmat <- try(solve(hessian/2))
if (class(invmat) == "try-error")
invmat <- matrix(NA, nrow = nrow(hessian), ncol = ncol(hessian))
But in Windows I have to add a test for null class or I get a fatal error
at the == when class is null
invmat <- try(solve(hessian/2))
if (!is.null(class(invmat)))
if (class(invmat) == "try-error")
invmat <- matrix(NA, nrow = nrow(hessian), ncol =
ncol(hessian))
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Peter D.M. Macdonald, D.Phil. McMaster University
Professor of Math & Statistics Hamilton, Ontario, Canada L8S 4K1
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*