R/latex_fivenum.R

Defines functions latex_fivenum

Documented in latex_fivenum

#' Returns character vector of one containing the results of the Tukey
#' five number summary calculations made by \code{fivenum()}.
#'
#' @param dist vector of numbers that are the argument to \code{fivenum()}
#' @param digits integer values with the number of digits to be displayed.
#' @import stats
#' @import stringi
#' @export
latex_fivenum <- function(dist, digits = 3) {
  stri_c("{", vector2string(signif(fivenum(dist), digits), SS = "}{"), "}")
}
rmsharp/rmsutilityr documentation built on Feb. 13, 2024, 6:01 p.m.