[R] Problem Using the %in% command

From: Paul Christoph Schröder <pschrode_at_alumni.unav.es>
Date: Wed, 20 Feb 2008 12:57:09 +0100


Hello all!

I have the following problem with the %in% command:  

  1. I have a data frame that consists of functions (rows) and genes (columns). The whole has been loaded with the "read.delim" command because of gene-duplications between the different rows.
  2. Now, there is another data frame that contains all the genes (only the genes and without duplicates) from all the functions of the above data frame.

What I want to do now is to use the "% in %" command to obtain a TRUE-FALSE data frame. This should be a data frame, where for every function some genes are TRUE and some are FALSE depending if they were or not in the specific function when matched against the "all genes" data frame.

The main problem I have is the way how the genes are in the first data frame. I used the "unlist" command to separate them through commas ",". But every time I do the match between the first and second data frame it returns out FALSE for every gene in every function.

Can anyone please give me a hind how to handle the problem? Thank you very much in advance!

Paul

-- 
Paul C. Schröder
PhD-Student 
Division of Proteomics, Genomics & Bioinformatics
Center for Applied Medicine (CIMA)
University of Navarra
Avda. Pio XII, 55
E-31008 Pamplona, Spain

Tel: +34 948 194700, ext 5023
email: pschrode_at_alumni.unav.es





	[[alternative HTML version deleted]]



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

Received on Wed 20 Feb 2008 - 11:58:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Feb 2008 - 13:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive