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 26, 2022, 4:02 a.m.