combine.datasets | R Documentation |
Combine two datasets, add new columns absent in each of them and fill them with specified value.
combine.datasets(df1, df2, value = 0)
df1 |
first data.frame to combine. |
df2 |
second data.frame to combine. |
value |
value which should fill missing columns. |
this function is useful to rbind two data.frames with different columns.
combined data.frame.
df1 <- data.frame(A=1:10, B=11:20, C=21:30)
df2 <- data.frame(E=1:10, C=11:20, B=21:30)
combine.datasets(df1, df2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.