[R] deleting column from data frame

Knut Krueger rh at krueger-family.de
Tue Feb 23 13:04:36 CET 2010


Hi to all,
test <- data.frame("X"=c(1:4),"Y"=c(5:8),"Z"=c(8:11))
test <- test[,-2]

Is there a way to specify the col name  "Y" to delete instead the number?

Kind regards Knut



More information about the R-help mailing list