According to David Parkhurst:
|>
|>
|> Thanks to the many! people who answered my query about removing columns
|> from a data frame. (I couldn't track that down in the splus help
|> system, nor using the indices of a couple of books.)
|>
|> I'll provide just a few responses, as they cover the gamut:
|>
|> Bill Venables:
|> You can do it the same way that you remove columns from a matrix:
|> Suppose you want to remove columns 2, 3 & 4:
|>
|> Dat <- Dat[, -(2:4)] # comma and parens necessary...
In fact, the comma is not necessary if Dat is a data frame but it might
be advisable to be consistent with other procedures.
best
Patrick
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|