hello, is it possible to merge 2 matrix or data.frame by roxnames? I checked details about the functino merge but I haven't fond this option. Can you help me please? thanks. _____________________________________________________________________________ [[alternative HTML version deleted]]
if your nrow is not big, transpose and merge and transpose back. HTH, On 6/20/07, elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:> hello, > is it possible to merge 2 matrix or data.frame by roxnames? > I checked details about the functino merge but I haven't fond this option. > Can you help me please? > thanks. > > > _____________________________________________________________________________ > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
elyakhlifi mustapha wrote:> hello, > is it possible to merge 2 matrix or data.frame by roxnames? > I checked details about the functino merge but I haven't fond this option. > Can you help me please? > thanks.The first paragraph of the Details section says: By default the data frames are merged on the columns with names they both have, but separate specifications of the columns can be given by by.x and by.y. Columns can be specified by name, number or by a logical vector: the name "row.names" or the number 0 specifies the row names. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Department of Public Health Sciences Faculty of Medicine, University of Toronto email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.6057
Hello, ok I know how to do to merge matrix or data.frame by "row.names" but my true objectif is to merge for example this data.frame:> Aobs Rép1 Rép2 Rép3 Rép4 Rép5 Rép6 Var1 145 145 150 145 140 145 Var2 150 150 160 155 155 150 Var3 155 155 160 150 150 140 Var4 150 145 145 145 140 145 Var5 135 130 145 135 135 130 and> Bpred Rép1 Rép2 Rép3 Rép4 Rép5 Rép6 Var1 146.00 144.00 151.00 145.00 143.00 141.00 Var2 154.33 152.33 159.33 153.33 151.33 149.33 Var3 152.67 150.67 157.67 151.67 149.67 147.67 Var4 146.00 144.00 151.00 145.00 143.00 141.00 Var5 136.00 134.00 141.00 135.00 133.00 131.00 and the main difficulty is to keep the names and the supernames. Do you know how. I know that the question isn't so easy but it's for a good display. thanks. _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail [[alternative HTML version deleted]]