bug in functions of form "mcpar<-"

Martyn Plummer plummer@iarc.fr
Wed, 17 Jun 1998 15:38:22 -0000 ()

This fairly harmless looking piece of code, which worked in
0.61 (and in S-PLUS) fails  in 0.62.1. 

R> "mcpar<-" <- function(x,mcpar) {attr(x,"mcpar") <- mcpar; x}
R> mcpar(x) <- c(1,100,1)
Error in mcpar<-(*tmp*, value = c(1, 100, 1)) : unused argument to function

The error message gives a hint about how to work around the problem -
just replace the argument "mcpar" with "value". 

R> "mcpar<-" <- function(x,value) {attr(x,"mcpar") <- value; x}
R> mcpar(x) <- c(1,100,1)

This breaks release 0.3-3 of my "coda" package, but I will fix it.
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch