I would like to rbind multiple data frames together. These data frames are data from SQL. At times some of the dataframes might be empty.
Code:
combined = rbind(df1,df2,df3,df4)
If one of the dataframes is empty, it returns a compile error. How do I rbind even if it is empty? Or is there a better way to handle this?
do.call(rbind, list(df1, df2, df3, df4))? - jay.sfdplyr::bind_rowsordata.table::rbindlist(slight code-golf, not sure if there's much more than that for me). - r2evans