You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok. I accidently found solution.
The problem is not in the loop.
I saw that error was not in the first time I ran the loop. But when I was writing this issue i missed it.
The problem is that gtsave have problem with overwriting .docx documents (that's not the case with .rtf)
Prework
Description
Table is saved to .docx properly when in separate chunk. When I try to generate many files from a loop it gives
When generating .RTF files from the same loop it works properly
Reproducible example
Sample of data:
Code:
Works properly for single
seq
. Works for any ofseq
from dataframe.When put in a loop like this:
Gives error message quoted previously.
When one line is changed to:
It properly generates 3 files.
Expected result
It should generate .docx files.
Session info
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=Polish_Poland.utf8 LC_CTYPE=Polish_Poland.utf8 LC_MONETARY=Polish_Poland.utf8 LC_NUMERIC=C
[5] LC_TIME=Polish_Poland.utf8
time zone: Europe/Warsaw
tzcode source: internal
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] gtsummary_1.7.2 gt_0.10.1 janitor_2.2.0 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[8] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.0 tidyverse_2.0.0 renv_1.0.7
loaded via a namespace (and not attached):
[1] utf8_1.2.4 generics_0.1.3 xml2_1.3.6 stringi_1.8.3 hms_1.1.3 digest_0.6.35
[7] magrittr_2.0.3 evaluate_0.23 grid_4.3.2 timechange_0.3.0 fastmap_1.1.1 broom.helpers_1.15.0
[13] fansi_1.0.6 scales_1.3.0 cli_3.6.2 crayon_1.5.2 rlang_1.1.3 bit64_4.0.5
[19] munsell_0.5.1 withr_3.0.0 yaml_2.3.8 parallel_4.3.2 tools_4.3.2 tzdb_0.4.0
[25] colorspace_2.1-0 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4 snakecase_0.11.1 fs_1.6.3
[31] bit_4.0.5 vroom_1.6.5 pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 glue_1.7.0
[37] xfun_0.43 tidyselect_1.2.1 rstudioapi_0.16.0 knitr_1.46 htmltools_0.5.8.1 rmarkdown_2.26
[43] compiler_4.3.2
The text was updated successfully, but these errors were encountered: