On 29/09/2009 4:54 PM, Rolf Turner wrote:
On 30/09/2009, at 9:32 AM, milton ruser wrote:

x=runif(12)
y=runif(12)
w=runif(12)

mydf<-data.frame(cbind(x,y,w))
head(mydf)

mydf<-subset(mydf, select=c(-x,-w))
head(mydf)


        But this doesn't work if NAME1 and NAME2 are ***names***,
        as the terminology would apply.  And that is precisely the
        situation in which one would wish to apply this sort of
        technique.

I'm not completely sure what you're getting at here, but I think milton is right in this example. (The original one was missing the "c".)

subset() is weird, it does very strange stuff in the select argument.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to