merge{base}
1
0
Entering edit mode
Jay Shin ▴ 30
@jay-shin-1820
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060817/ 1946208b/attachment.pl
• 557 views
ADD COMMENT
0
Entering edit mode
Al Ivens ▴ 270
@al-ivens-1646
Last seen 10.2 years ago
Jay, Not in the fewest lines possible, but: indexfile <- match(stat.result$probeID,annotated$probeID) all <- cbind(stat.result,annotated[indexfile,]) write.table(all,file="./annotated_result.txt",sep="\t",row.names=F) should do it, but perhaps also requiring as.character() around each of your two match terms if it doesnt. Cheers, al > -----Original Message----- > From: bioconductor-bounces at stat.math.ethz.ch > [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Jay Shin > Sent: 17 August 2006 19:59 > To: Bioconductor > Subject: [BioC] merge{base} > > > I am having very hard time merging two data frames into one. > > I have two sets of data: > 1) data frame of significant genes called, "stat.result" and probeID > as an identifier > 2) data frame of my own annotation file called, "annotated" and > probeID as an identifier > > when I run the following: > >all<-merge(stat.result, annotated, by.x="probeID", by.y="probeID", > all.x = TRUE) > >write.table(all, file = annotated_result.txt, sep = "\t", > row.names > = F, col.names = T) > > I get a text file called, "annotated_result.txt" AND when I open the > file, some, but not all my probes are annotated and some are labeled > "NA" although there's a matching ID in my own annotation file. > > Can someone please help me to fix this problem? > Thank you! > Jay > > > > > ________________________________________________________ > ETH Zurich > Jay W. Shin > Institute of Pharmaceutical Sciences > HCI H394 > Wolfgang-Paulistrasse 10 > 8093 Zurich, Switzerland > > jay.shin at pharma.ethz.ch > www.pharma.ethz.ch > > ++41 44 633 73 68 phone > ++41 44 633 13 64 fax > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/biocondu> ctor > Search the > archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

Traffic: 586 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6