[R] Simple Merge

Brian Diggs diggsb at ohsu.edu
Mon Apr 16 22:26:50 CEST 2012


On 4/16/2012 1:23 PM, Jeff wrote:
>
>
> I'm new to R.
>
> I have two data frames I need to merge. One has an ID column the other
> does not, but both have the same number of rows that are ordered in the
> same way - e.g., row 1 is the same person in both data frames. For this
> reason, there is no need to sort or specify a "by" column.
>
> I can't seem to figure out how to do this from anything I can find on-line.
>
> Can someone point me in the right direction ?

cbind will combine two data frames row-by-row (assuming they have the 
same number of rows).

> Thanks
>
> Jeff
>


-- 
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University



More information about the R-help mailing list