[R] rbind for similar data frames

Thomas Petzoldt
Fri, 27 Aug 2004 12:15:17 -0000

Gladys Castillo Jord??n wrote:

> Hi all:
> I have a problem when I try to concatenate two similar data frames with
> different number of rows using rbind.  I did something like this:
>
>
>>d<-data.frame(a=1:10,b=2:11,c=3:12)
>>e<-data.frame(a=101:105,b=102:106,c=103:107)
>>data=rbind(d,e)
>
>
> The resulting row enumeration is not sequentially ordered as I expected:

[..]

> Any suggestion?

row.names(data)  <- 1:nrow(data)

Hope it helps

Thomas P.