R/round_trim.R

Defines functions round_trim

# round_trim.R

#' `round_trim` is a wrapper for [base::round()] and [base::format()].
#'
#'
#' @param x : The number of the rounded.
#' @param nsmall : The number of digits.
#'
#' @export
round_trim <- function(x, nsmall) {
    format(
        x      = round(x, nsmall),
        nsmall = nsmall
    )
}
jeremieboudreault/jtheme documentation built on Jan. 29, 2023, 7:12 a.m.