Closed AuroreAA closed 1 year ago
Here is the detailed error:
and here is the line with the issue:
everything is working well with flextable_0.9.1
From the NEWS
file of package flextable
for version 0.8.3:
I guess that versions <= 0.8.2 require a character string and don't support paragraphs that have formatting in add_footer_lines()
.
We just need to add the requirement for flextable (>= 0.8.3) in the DESCRIPTION
file.
library(robmedExtra) data("BSG2014")
seed to be used for the random number generator
seed <- 20211117
perform mediation analysis via robust bootstrap test ROBMED
set.seed(seed) robust_boot <- test_mediation(BSG2014, x = "ValueDiversity", y = "TeamCommitment", m = "TaskConflict", robust = TRUE)
construct flextable of results
to_flextable(robust_boot) Error in inverse.rle(structure(list(lengths = colwidths, values = values), : invalid 'rle' structure
sessionInfo() R version 4.2.2 (2022-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=English_Netherlands.utf8 LC_CTYPE=English_Netherlands.utf8
[3] LC_MONETARY=English_Netherlands.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Netherlands.utf8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] robmedExtra_0.1.0 robmed_1.0.0 robustbase_0.95-1 ggplot2_3.4.2
loaded via a namespace (and not attached): [1] Rcpp_1.0.8.3 lattice_0.20-45 assertthat_0.2.1
[4] digest_0.6.29 utf8_1.2.2 mime_0.12
[7] R6_2.5.1 MatrixModels_0.5-1 stats4_4.2.2
[10] evaluate_0.20 highr_0.9 pillar_1.9.0
[13] gdtools_0.2.4 rlang_1.1.1 uuid_1.1-0
[16] rstudioapi_0.13 data.table_1.14.2 SparseM_1.81
[19] Matrix_1.5-1 DT_0.23 flextable_0.8.2
[22] rmarkdown_2.14 splines_4.2.2 stringr_1.5.0
[25] htmlwidgets_1.5.4 munsell_0.5.0 shiny_1.7.1
[28] compiler_4.2.2 numDeriv_2016.8-1.1 httpuv_1.6.5
[31] xfun_0.31 pkgconfig_2.0.3 systemfonts_1.0.4
[34] base64enc_0.1-3 mnormt_2.1.1 htmltools_0.5.2
[37] tidyselect_1.2.0 tibble_3.1.7 fansi_1.0.3
[40] dplyr_1.0.9 withr_2.5.0 later_1.3.0
[43] MASS_7.3-58.1 grid_4.2.2 xtable_1.8-4
[46] gtable_0.3.3 lifecycle_1.0.3 DBI_1.1.3
[49] magrittr_2.0.3 scales_1.2.1 zip_2.2.1
[52] cli_3.6.0 stringi_1.7.6 sn_2.1.0
[55] promises_1.2.0.1 xml2_1.3.3 ellipsis_0.3.2
[58] generics_0.1.3 vctrs_0.6.2 boot_1.3-28
[61] tools_4.2.2 glue_1.6.2 officer_0.4.4
[64] DEoptimR_1.0-12 fastmap_1.1.0 survival_3.4-0
[67] colorspace_2.0-3 knitr_1.39 quantreg_5.95