R/abs_formatter.R

Defines functions abs_formatter

Documented in abs_formatter

#' Absolute value formatter for continuous_scale
#' 
#' This will print the absolute value for labeling on axis. Usefull for stacked
#' bar plots where negative values are not negative percentages but represent
#' negative groups.
#' 
#' @param x value to be reformatted.
#' @return the absolute value of x.
abs_formatter <- function(x) {
	return(abs(x))
}
jbryer/likert documentation built on July 29, 2022, 3:42 p.m.