datas[ , "A" != colnames(datas)]

Uwe Ligges

On 02.02.2010 17:35, anna wrote:

Hi, I have a data frame datas with half of the columns with the same name
"A". I want to delete all those columns from the data frame so here is what
I did:
datas$A<- NULL
The problem is that it deleted only one column, I would have to do it as
many times as there are "A" columns. Is there a way to do it in one time?
thank you

-----
Anna Lippel

______________________________________________
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