ddotta / tablexlsx

R package to export data frames from R to xlsx workbook
https://ddotta.github.io/tablexlsx/
Other
16 stars 1 forks source link

`mergecol` argument not usable with multiple data.frames #21

Closed JulienBlasco closed 6 months ago

JulienBlasco commented 7 months ago

The following code produces an error:

toxlsx(list(mtcars, iris), path=tempdir(), mergecol = list("cyl", "Species"))
# Erreur dans if (vector[i] != vector[i - 1]) { : 
#   l'argument est de longueur nulle

Desired result

This should write mtcars with "cyl" column merged, and iris with "Species" column merged.

JulienBlasco commented 7 months ago

I believe the code should be slighly reformatted in order to operate the merging of columns inside add_table