#' Statistiques descriptives
#'
#' @param x Tableau d'une ligne indiquant les statistiques descriptives.
#'
#' @keywords internal
#' @import kableExtra
#' @export
kable_statsDesc <- function(x){
return(
kable(
x = cbind(x[, lapply(.SD, formatr), .SDcols = 1:(ncol(x)-1)], # les statistiques
x[, lapply(.SD, formatr, 0), .SDcols = ncol(x)]), # nombre d'individus
format = "latex",
booktabs = TRUE,
row.names = FALSE,
linesep = "",
align = "r"
) %>%
kable_styling(
latex_options = c("hold_position",
"repeat_header"),
position = "center"
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.