aa <- data.frame(a= c(1,1,2,3,4), b = c(5,3,2,6,1))
bb <- data.frame(a= c(1,1,6,7,4), c = c(4,3,7,2,1))
I want to merge aa and bb by the rows, however, when I use the rbind() function, it gives me an error that "the numbers of columns of arguments do not match". The final format that I want keeps all the columns that are present in both data frame and fill them with zeros if one column does not exist in the other dataframe's part. A sample output for the reproducible data would be as follows:
Thank you for your time!