R-alpha: Re: select.frame
Peter Dalgaard BSA
16 Apr 1997 01:51:18 +0200
Ross Ihaka <firstname.lastname@example.org> writes:
> 2. As written, the function uses R scoping rules to pass the value of
> the variable "nm" into the body of "subst.exp", and so the function
> will not work in S. It might be better to pass "nm" as an argument
> so that the function is portable.
..and same thing applies to subst.exp itself, isn't that so? As
written, subst.exp would not be able to find subst.exp. Let's see:
Error in f(n): couldn't find function "f"
Right. One of the major annoyances in S, actually. This has bugged be
always. You need to put the function in the "evaluation frame" or
define it globally. Maybe one should just leave it and let S solve the
porting problems? ;^)
> 3. It might be good to check that only ":" expressions allowed.
Hum. I was beginning to like the idea that you could put complicated
expressions in there, as in
select.frame(dfr, seq(visit1.1st, length=10, by=3))
when you have visit1.1st, visit1.2nd, visit1.3rd, .... visit10.3rd and
you want to look at the *.1st measurements. The semantics are that
variable names get replaced by their column numbers, if they exist in
the frame, and all that is required is that the resulting integer
expression makes sense.
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (email@example.com) FAX: (+45) 35327907
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: firstname.lastname@example.org