To concatenate two data frames, you can use the rbind() function to bind the rows as follows:
Note: Column names and the number of columns of the two data frames should be the same.
x <- data.frame(a=c(1,2,3), b=c(4,5,6), c=c(7,8,9))
y <- data.frame(a=c(10,11,12), c=c(13,14,15))
y$b <- NA
new <- rbind(x,y)
new
a b c
1 1 4 7
2 2 5 8
3 3 6 9
4 10 NA 13
5 11 NA 14
6 12 NA 15
You can also use the bind_rows() function from the dplyr package as follows:
library("dplyr")
> bind_rows(x,y)
a b c
1 1 4 7
2 2 5 8
3 3 6 9
4 10 NA 13
5 11 NA 14
6 12 NA 15