From therneau at mayo.edu  Fri Dec 26 14:31:11 2008
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Fri, 26 Dec 2008 07:31:11 -0600
Subject: [Rd] issue with [[<-Call
In-Reply-To: <alpine.LFD.2.00.0812260810590.3353@gannet.stats.ox.ac.uk>
Message-ID: <EDFDBF4E8E9AE049A9BB81801F493041271E42@msgebe21.mfad.mfroot.org>

Brian,
 Thanks for the comments.

 -- I agree that the vector form is more compact.  I was using a loop
because I found it to be even more transparent to the class.  For a one
time task such as this efficiency is not an issue.
 -- I'll make use of eval.parent().  I hadn't yet stumbled on that
 -- The code in lm() is almost exactly my "other approach"!  (I doubt
convergent evolution - I must have noticed this example at some past
point).

  I was reasoning in parallel to lists
> temp <- list(a=1:3)
> temp[['b']] <- 5:6
> temp
$a
[1] 1 2 3
$b
[1] 5 6

 and assumed that this should work for call objects.  The informal
"underneath it all, all the language objects are lists" idea, which I
think I absorbed from one of the original Bell Labs books.  I leave it
to the core team to decide if this should be 'fixed'.

	Terry T.



[Rd] issue with [[<-Call
Therneau, Terry M., Ph.D.