#' @title Remove Leading Zero
#' @export
remove_leading_zero <- function(xs) {
# Problem if any value is greater than 1.0
digit_matters <- xs %>% as.numeric %>%
abs %>% is_greater_than(1)
if (any(digit_matters)) {
warning("Non-zero leading digit")
}
str_replace(xs, "^(-?)0", "\\1")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.