R/format_number.R

Defines functions format_number

Documented in format_number

#'Function to format a number
#'
#'This function takes a floating number and round to 2 decimal point
#'
#'
#' @param x a floating number
#' @export format_number
#' @aliases format_number
#' @return formatted number
#' @keywords internal
#' 
#formatting a nubmber to decimal places
format_number <- function(x){
  format(round(x, 2), nsmall = 2)
}

Try the gapmap package in your browser

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

gapmap documentation built on May 29, 2017, 7 p.m.