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

Wrong default arguments in `add_table` for footnotes #26

Closed JulienBlasco closed 5 months ago

JulienBlasco commented 6 months ago

add_table throws an error when used with default tablefootnotes arguments.

Reproducible example

wb <- openxlsx::createWorkbook()
add_table(mtcars, wb, "Feu 1", "mtcars")
# Erreur : TableFootnote1 must be a character vector of length 1L

This is due to the fact that default arguments for footnotes are lists while add_table expects a character vector, see below

https://github.com/ddotta/tablexlsx/blob/77b47a74962f4625d2fe7ad0b094bb55248b241f/R/add_table.R#L21-L32