Hi, merge(df.x, df.y, by.x=1)
where df.x is your Snpfile and df.y is Annotation file. -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 24/08/07, Morassa Mohseni <[EMAIL PROTECTED]> wrote: > > Hi, > > Thanks in advance for reading this post. > > I received some affymetrix genotyping data back recently (250K, Nsp > array) However, in order for me to do any analysis on this data set, I > need > to add append the annotation file to it. Basically I want to do something > that looks like this: > > > > Snpfile(tab delimited): > > > > SNPID Genotype X Y > > 123 AA 13.4 1.2 > > 456 AB 10.1 12.2 > > 789 BB 2.7 14.4 > > > > Annotation file (csv file): > > > > rs#, SNPID, Chromosome > > rs23525, 456, 12 > > rs78423, 123, 4 > > rs82342, 789, 9 > > > > What I am trying to get is an output file that looks like this: > > > > SNPID rs# > Chromosome Genotype X Y > > 123 rs78423 4 AA > 13.4 > 1.2 > > 456 rs23525 12 AB > 10.1 > 12.2 > > 789 rs82342 9 BB > 2.7 > 14.4 > > > > > > The SNPID is the same in both files so I would like to use that to match > up but they are not in the same order in both files, so I want to make > sure > that I am appending and merging the 2 files correctly. So far all ive > really > been able to do is import the files into R Ive been looking through the > posts, and was wondering if I could use cbind( ) to merge the files?...not > sure though. > > > > Thanks again!! > > Morassa Mohseni > > > > PhD Student > > Johns Hopkins Dept. of Human Genetics > > Baltimore, MD > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@stat.math.ethz.ch 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]]
______________________________________________ R-help@stat.math.ethz.ch 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.