[R-SIG-Mac]A mac/win difference in R1.4.0

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 14 Jan 2002 11:11:48 +0100


>>>>> "Peter" == Peter Macdonald <pdmmac@mcmail.cis.mcmaster.ca> writes:

    Peter> Can anyone give me insight on this or suggest a better way? Thanks!
    Peter> On the Mac I can write

    Peter>   invmat <- try(solve(hessian/2))
    Peter>   if (class(invmat) == "try-error")
    Peter> 	invmat <- matrix(NA, nrow = nrow(hessian), ncol = ncol(hessian))

    Peter> But in Windows I have to add a test for null class or
    Peter> I get a fatal error at the == when class is null

    Peter>  invmat <- try(solve(hessian/2))
    Peter>  if (!is.null(class(invmat)))
    Peter>    if (class(invmat) == "try-error")
    Peter>       invmat <- matrix(NA, nrow = nrow(hessian), ncol=ncol(hessian))

    Peter> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    Peter> Peter D.M. Macdonald, D.Phil.      McMaster University
    Peter> Professor of Math & Statistics     Hamilton, Ontario, Canada L8S 4K1
    Peter> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

If this is really true (make sure that you have identical
	"hessian" for the two cases, and please provide an example that
	is reproducible, i.e.  prepend something equivalent to
	   hessian <- .............
	to your example),
	
then that may be an R bug and you should either ask on R-help
or (if you have read the part of the R FAQ about bug reporting),
use  bug.report().

Good bug reports are one way of collaboration for the R project;
thank you in advance:

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><