kableExtra
kableExtra copied to clipboard
Can't position multiple tables side by side on an Rmarkdown pdf
Describe the bug
Is there a way to position multiple dataframes side by side on an Rmarkdown pdf?
i tried to print them as one kable and it successfuly centered the "global kable" on the page, but how can i change the space between the two dataframes?
I tried to print them as one kables() of two kables()
but i cant even center them, let alone change the space between the two kable()
.
And ultimately how can i position a kable on the right or on the left side of a page even without having paragraphs to wrap it around.
Here's a screenshot of the results and the code i wrote
#two dataframes in one kable
df1=table_cara_animals_global
df2=table_cara_animals_precis
kable(
list(df1,df2),
booktabs=T,
caption="kable Caracteristiques des groupes étudiés",
align="c"
) %>%
kable_styling(latex_options = c("striped","hold_position"))
t1=kable(df1,booktabs=T,align="c")
t2=kable(df2,booktabs=T,align="c",digits=2)
#two kables, each for each dataframe inside a kables()
kables(
list(t1,t2),
caption=c("kables of 2 kable Caracteristiques des groupes étudiés")
) %>%
kable_styling(latex_options = c("striped","hold_position"),position="center")