kbl() arguments and defaults don't match current knitr:::kable_latex() ones
dmurdoch opened this issue · comments
knitr:::kable_latex()
has a different argument list now than it did when kableExtra::kbl()
(previously kableExtra::kable()
) was added. The defaults for some arguments have also changed. Users can still access newer parameters (e.g. tabular
) using the ...
, but the defaults for others may be wrong.
There's no perfect solution (knitr might change again), but there are two things to do:
- document the issue in the
?kbl
help page. - update the knitr version requirement, or make the calls conditional on the knitr version.
I've looked through the knitr history, and I think these are the important changes. knitr uses versions like x.y.z for patch versions; releases are x.y. So 1.44.7 changes appeared on CRAN in 1.45 (the current release, from Oct 30).
-
1.44.7: added ... to kable_latex
-
1.39.5: added
tabular
argument and changed default forvalign
. -
1.32.5: reverted changes to defaults for
toprule
,bottomrule
andmidrule
-
1.31.3: changed defaults for
toprule
,bottomrule
andmidrule
-
1.30.6: changed default for
table.attr
-
1.24.5: added
position
I think requiring >= 1.33 (April 2021), and handling tabular
by a version check seems best. I'll commit this change after testing...