Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0304081441560.6577-100000@gannet.stats>
Date: 2003-04-08T13:45:00Z
From: Brian Ripley
Subject: Multiple Merge
In-Reply-To: <169.1ce0f5a5.2bc3c9df@aol.com>

On Tue, 8 Apr 2003 TyagiAnupam at aol.com wrote:

> How to merge multiple dataframes with a common column? Merge takes only two 
> dataframes as arguments.
> Something like:
> df <- merge(df1,df2,df3,...,by="ID")

Is that a unique ID the same values of which occur in all the dfs?  Then
it is not a question of merging.  Sort them all on ID and cbind them.

Otherwise you can merge df1 with df2, df12 with df3 etc.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595