R/pptrunc.R

Defines functions pptrunc

Documented in pptrunc

#' pptrunc
#'
#' @param data The variable that will be truncated
#' @param max_value The upper bound ( -max_value is the lower bound)
#'
#' @return the highest(or the lowest) value of "data" and "max_value"
#'
#'
#'
#'

pptrunc = function(data, max_value){
  outd = ifelse(data > max_value, max_value, data)
  return(ifelse(outd < - max_value, - max_value, outd))
}

Try the activityCounts package in your browser

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

activityCounts documentation built on July 31, 2019, 9:04 a.m.