R/my_range.R

Defines functions catenate_by_endash my_range

catenate_by_endash <- function(range) {
  start <- sprintf("%.1f", range[1])
  end   <- sprintf("%.1f", range[2])
  paste(start, end, sep = "--")
}

#' @export
my_range <- function(df_iris) {
  df_iris %>%
    range() %>%
    catenate_by_endash()
}
akikirinrin/pkgtest documentation built on Jan. 17, 2020, 12:20 a.m.