I am using kableExtra to format tables in rmarkdown. In one of my dataframes I am obtaining a strange result...
ncol(Selected)
Selected%>%
kable("html",format.args = list(decimal.mark = ".", big.mark = ","),caption = "Variables description and data cleaning and treatment summary") %>%
add_header_above(c(" " = 2, "Kolmogorov-Smirnov" = 2, "Kruskall-Wallis" = 2, "Wilcoxon Test"= 2)) %>%
kable_styling()
The object Selected is a dataframe, with dimension (256;8)...
I got this:
[1] 8
Error in htmlTable_add_header_above(kable_input, header, bold, italic, : The new header row you provided has a different total number of columns with the original kable output.
What is wrong? By ncol, I confirmed the object Selected has 8 columns... Thanks in advance.