Dear Jacy,
Try this:
colnames(FREQ) %in% colnames(genotype)
See ?"%in%" for details. Also, take a look at also ?match.
HTH,
Jorge
On Wed, Mar 25, 2009 at 3:49 PM, Crosby, Jacy R
<Jacy.R.Crosby@uth.tmc.edu>wrote:
> What am I missing here? Both of my column headers in the 'FREQ'
table are
> found in the 'genotype'; however, they aren't being recognized.
>
> > colnames(FREQ)
> [1] "X17362526" "X17362627"
>
> > colnames(genotype)
> [1] "X17362311" "X17362316" "X17362346"
"X17362420" "X17362421"
> "X17362422" "X17362435" "X17362438"
"X17362459"
> [10] "X17362488" "X17362493" "X17362526"
"X17362542" "X17362565"
> "X17362566" "X17362581" "X17362594"
"X17362605"
> [19] "X17362627" "X17362642" "X17363363"
"X17363364" "X17363388"
> "X17363389" "X17363404" "X17363410"
>
> > colnames(genotype)==colnames(FREQ)
> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
> FALSE FALSE FALSE FALSE FALSE FALSE FALSE
> [19] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
[[alternative HTML version deleted]]