Hi, On Tue, Feb 2, 2010 at 11:47 AM, anna <lippelann...@hotmail.com> wrote: > > This is what I just found now but I guess there is a simpler way: > > datas[which(names(datas)=="A")]<-list(rep(NULL,length(which(names(datas)=="A")))) > but it worked
For what it's worth, you could also have done: clean <- datas[,-which(names(datas)=="A")] (note that indexing with a "negative" vector removes those rows/columns from your object (instead of picking them)). -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact ______________________________________________ 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.