[Rd] loglin( tab, margin, start = bad.start ) kills R (PR#7123)

From: <cberry_at_tajo.ucsd.edu>
Date: Thu 22 Jul 2004 - 03:37:55 EST

> tab <- array( sample(3^5), rep(3,5) )
> loglin( tab, list(1,2,3,4,5) )[[1]] # AOK
2 iterations: deviation 5.456968e-12
[1] 10909.89
> loglin( tab, list(1,2,3,4,5), c(1,2,3) )[[1]] # OUCH!

Process R bus error at Wed Jul 21 17:03:55 2004

this is inconsistent - sometimes issuing this msg several times before barfing:

Error in switch(z$ifault, stop("This should not happen"), stop("This should not happen"), :

        Incorrect specification of 'table' or 'start'

appl/loglin.c assumes that start (aka 'fit') has enough memory allocated.

Possible fix in stats/R/loglin.R :

    	ntab <- length(table)
+	nstart <- length( start )
+	if (nstart != ntab ) stop(" start and table must be same length " )





> version
_ platform sparc-unknown-linux-gnu arch sparc os linux-gnu system sparc, linux-gnu status major 1 minor 9.0 year 2004 month 04 day 12 language R

and with windows 98 rw1091.exe version, I get the popup for illegal operation. Again, I sometimes get the above error msg first.

Chuck

Charles C. Berry                        (858) 534-2098 
                                         Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu	         UC San Diego
http://hacuna.ucsd.edu/members/ccb.html La Jolla, San Diego 92093-0717

R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel Received on Thu Jul 22 03:50:40 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:03 EST