R/noZero.R

#' Remove one or more zeroes before the decimal point
#'
#' @param str The character string to process.
#'
#' @return The processed string.
#' @seealso [formatCI()], [formatR()], [formatPvalue()]
#' @export
#'
#' @examples noZero("0.3");

noZero <- function (str) {
  return(gsub("0*\\.", ".", str));
}

Try the ufs package in your browser

Any scripts or data that you put into this service are public.

ufs documentation built on July 9, 2023, 6:07 p.m.