Re: [R] merge with rownames?

From: Chuck Cleland <>
Date: Thu, 03 Apr 2008 10:53:10 -0400

On 4/3/2008 10:47 AM, Mark Kimpel wrote:
> Can merge be tricked into merging via rownames as opposed to via contents of
> a particular column? I have two data.frames with overlapping, but out of
> order, rownames, but no column contents in common and would like to merge
> without cbinding the rownames to the data.frames.
> Mark

   The details section of the help page for merge suggests you can use either merge(..., by=0) or merge(..., by="row.names").


Chuck Cleland, Ph.D.
NDRI, Inc. (
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 Apr 2008 - 15:08:15 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 Thu 03 Apr 2008 - 15:30:25 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive