Closed JulienBlasco closed 5 months ago
Example uses (taken from the example gallery):
Using character argument in footnote1:
df1 %>% toxlsx(path = mypath, footnote1="hello")
Using character argument in mergecol:
df2 %>% toxlsx(path = mypath, mergecol = c("country","group"))
Using length-one character argument for footnote3 (so the same footnote is added to each table)
list(tb1,tb2) %>%
toxlsx(tosheet = list("tb1" = "mydata",
"tb2" = "mydata"),
footnote1 = list("tb1" = "The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant.",
"tb2" = "The data give the speed of cars and the distances taken to stop. Note that the data were recorded in the 1920s."),
footnote2 = list("tb1" = "Predicted attribute: class of iris plant.",
"tb2" = "Data recorded in the 1920s"),
footnote3 = "Data is fictious.",
mergecol = list(tb1 = "tables", tb2 = "tables"),
path=mypath)
I mark this pull request as draft so we can change the documentation before merging.
Added another evolution : a bygroup argument (as suggested in #23 )
Example usage:
toxlsx(mtcars, path = tempdir(), bygroup = "cyl", groupname = TRUE)
@ddotta les modifications que j'ai proposées engendrent des incohérences dans la documentation et les tests. Je te laisse corriger si tu as le temps. Sinon je veux bien que tu m'expliques rapidement les points à mettre à jour. Merci 🙏
Merci pour tout ton travail @JulienBlasco, j'essaye de dégager du temps en fin de semaine pour tout regarder ! 🚀
Slight changes to API in order to solve :
19
21
26
23
:warning: We need to change the documentation accordingly
The main changes are that
mergecol
can now be used with multiple data frames, and that we can only supply character arguments instead of lists in the following cases: