#' trim number for breaks
#'
#' This function trims number for classes breaks
#'
#' @param x numerical value to be trimmed
#' @param keep.digits boolean value to indicate whether to keep digits in the given number.
#' @export
#' @examples
#' hello(fname="Your",lname="Name")
trimnum <- function(x,keep.digits=F) {
x.round<-round(x)
x.n<-nchar(as.character(x.round))
x.n.trim<-x.n-floor(x.n/2)
x.trim<-floor(x.round/10^x.n.trim)
x.trim<-x.trim*10^x.n.trim
x.trim
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.