[R] deleting column from data frame

Henrique Dallazuanna wwwhsd at gmail.com
Tue Feb 23 18:44:19 CET 2010


One more option:

 transform(test, Y = NULL)

On Tue, Feb 23, 2010 at 9:04 AM, Knut Krueger <rh at krueger-family.de> wrote:
> 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
>
> ______________________________________________
> R-help at 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list