I have the following dataframes tt1
> tt1[2,]
date close emp pred
2 1982-03-24 112.97 -1 1
and dataframe
You can't have duplicate rownames in a data frame or matrix. rbind()
checks the rownames on the object it creates and adjusts duplicate rownames to make them unique.
You can easily reset the row names, here is a simple example:
dat1 <- data.frame(A = 1:3, B = 1:3)
dat2 <- data.frame(A = 4:6, B = 4:6)
out <- rbind(dat1[2,], dat2[2,])
rownames(out) <- NULL
Giving
> out
A B
1 2 2
2 5 5
Try
rownames(mydataframe) <- NULL
See the documentation (type ?rownames
on the prompt) for more info.