On Feb 2, 2010, at 12:04 PM, Steve Lianoglou wrote:

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)).

But only with numeric vectors.


-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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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