subset(miceTrainSample, select = -plD50) On Fri, Jul 16, 2010 at 11:22 AM, Addi Wei <addi...@gmail.com> wrote: > > names(miceTrainSample) > [1] "b_double" "KierA2" "KierFlex" "Q_VSA_POS" "pID50" > > In the above code, how do I delete "pID50" column to store the resulting > object without indicating column "5". The code below does the trick, but I > wish to delete the column by specifying "-pID50" instead of "5". > > names(miceTrainSample)[-5] > [1] "b_double" "KierA2" "KierFlex" "Q_VSA_POS" > > -- > View this message in context: > http://r.789695.n4.nabble.com/Simple-question-regarding-name-of-column-headers-tp2291534p2291534.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >
-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? ______________________________________________ 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.