Peter Dalgaard BSA writes:
A loose idea for *post*-0.50 development
I've been giving a some (but not all that many) thoughts to whether
some of the conceptual difficulties facing newcomers could be avoided
by having simplified functions for common operations. We already have
parts of this, e.g. in Kurts ctest routines. Specifically, I was
thinking about data frames: How about
dfr.sel<-select.frame(dfr,age,sex,pain1:pain5)
with the : specifying a range, instead of
dfr.sel<-dfr[,c(1,2,5,6,7,8,9)]
attach(dfr)
dfr.sel<-data.frame(age,sex,pain1,pain2,pain3,pain4,pain5)
detach(dfr)
(which isn't even safe if there are variables of the same name in the
global environment)
dfr.sub<-subset.frame(dfr,sex==1 && age > 30)
dfr.sub<-dfr[dfr$sex==1 && dfr$age > 30,]
Both would seem to be quite possible to implement, although they do
need to do some sneaky bits of computing-on-the-language internally.