R/tmle_bound.R

Defines functions .bound

# CK: copied from tmle package.
#---------- function .bound ---------------
# set outliers to min/max allowable values
# assumes x contains only numerical data
#-----------------------------------------
#' @export
.bound <- function(x, bounds) {
  x[x>max(bounds)] <- max(bounds)
  x[x<min(bounds)] <- min(bounds)
  return(x)
}
ck37/varimpact documentation built on June 23, 2022, 4:41 a.m.