How to export >100x faster .csv files from R for big data
TLDR; You should use data.table::fwrite() to export .csv from r, because it is more than >100 times faster than other methods. If you want to export your data as Excel xlsx, you should use openxlsx. But it is not recommended for big data. If you want to learn more about Data Science in R, I recommend this book*.