tomwenseleers / export

R package for streamlined export of graphs and data tables.
192 stars 35 forks source link

Warnings in table2*** functions #35

Closed niszet closed 3 years ago

niszet commented 3 years ago

Hi,

Several functions of table2*** (i.e. table2doc()) outputs warnings about flextable::colformat_***.

export::table2doc(iris)
#> Warning in colformat_num.flextable(x = tab, col_keys = col.other, digits =
#> digits): argument col_keys is deprecated in favor of argument j
#> Warning in colformat_int.flextable(x = tab, col_keys = col.df): argument
#> col_keys is deprecated in favor of argument j
#> Warning in colformat_num.flextable(x = tab, col_keys = col.pval, digits = ):
#> argument col_keys is deprecated in favor of argument j
#> Exported table as Rtable.docx
#> Error in knit_print.flextable(x, ...): unsupported format for flextable rendering:markdown_strict

This is because the argument col_keys are deprecated (should use j instead).

I found around here in this code.

https://github.com/tomwenseleers/export/blob/master/R/table2office.R#L281 https://github.com/tomwenseleers/export/blob/master/R/table2office.R#L282 https://github.com/tomwenseleers/export/blob/master/R/table2office.R#L283

cvanderaa commented 3 years ago

Hi @niszet ! Thanks a lot for your message. I adapted the code, the warnings should be gone now with the latest version of export.

niszet commented 3 years ago

Hi @cvanderaa -san! Sorry for late reply and thank you for your quick response. We love this export package! And thank you for your update.