Is there a way to stack dataframes in a row wise fashion. Consider the following code
motors <- c("audi", "honda", "ford")
age <- c(1, 2, 3)
motors1 <- motors
age1 <- c(2, 3, 1)
dat1 <- data.frame(motors, age)
dat2 <- data.frame(motors1, age1)
I would like to perform a rbind() type operation on dat1 and dat2 but this wont work as "motors" column in dat1 and "motors2" in dat2 are different.
Is there a way to perform this operation the to combine the two dataframes into 1 so there is still 2 columns of data but 8 rows of data (including column names).