I have three dataframes of variable row length:
df1 (column names a,b,c)
df2 (column names d,e,f)
df3 (column names g,h,i)
How can I combine them into one table
(one dataframe under the other)
table.all <- rbind(df1,df2,df3)
only works for same column names but my column names are different.
Then save this table to a csv:
write.csv(table.all ,"table.all .csv")
You want to make sure all columns are the same data type, otherwise you will get an error, but if your data frames are of the same structure, then the solution could be
And this will work with data frames with different number of rows as well.