I am quite new to R and would require some advice.
I have exported a list of dataframes final_data
into excel using the following code from xlsx
package:
lapply(final_data,function(x){
write.xlsx2(x,file = "Final.xlsx",sheetName = x,append = TRUE, row.names = FALSE)
})
However, my sheet name does not reflect the name of the corresponding dataframes from the original list. Instead, the sheet name became "Sheet0", "Sheet1", "Sheet2" etc. Is there something that needs to be changed to the above code? Would greatly appreciate any advice. Thank you!