Skip to content
Prev 12633 / 398502 Next

style question: returning multiple arguments - structure orlist

On 28 Jul 2001, Peter Dalgaard BSA wrote:

            
I think you'll find that the first argument of an assignment function has
to exist already -- the function is passed the evaluated first argument.

This means it isn't quite true that
  a<-"foo<-"(a,value)
is the same as
  foo(a)<-value

eg
Error: Object "a" not found
[[1]]
a

[[2]]
[1] 1
[[1]]
*tmp*

[[2]]
[1] 4


If this is correct, then you can't really write "list<-"

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._