[Rd] Bug with lists and expressions (PR#589)

dmurdoch@pair.com dmurdoch@pair.com
Tue, 4 Jul 2000 04:20:04 +0200 (MET DST)


 I'm running R 1.1.0 for Windows; the behaviour is the same in 1.0.1.

 # create a list containing an expression: no problem
  x _ list(NA, expression(1))

 # Try to assign an expression to a list element, and get an error:
  x[[1]] _ expression(1)

 # Try again with a named list element:  no problem!
  x _ list(a=NA,expression(1))
  x$a _ expression(1)

The error message is: 

Error in "[[<-"(*tmp*, 1, value = expression(1))  :
	incompatible types

I think the error is in "[[<-", but that's a primitive, and I don't
know how to track it down any further.

Duncan Murdoch

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._