From dmurdoch@pair.com  Tue Jul  4 03:26:41 2000
From: dmurdoch@pair.com (Duncan Murdoch)
Date: Tue, 04 Jul 2000 02:26:41 GMT
Subject: [Rd] Bug with lists and expressions
Message-ID: <39614504.13951296@julian.uwo.ca>

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


[Rd] Bug with lists and expressions
Duncan Murdoch