R/add_float_range.R

Defines functions add_float_range

Documented in add_float_range

#' Float range
#'
#' Checks if a numeric variable is within a continuous float range.
#' @param variable Numeric variable.
#' @param min Minimum possible value.
#' @param max Maximum possible value.
#' @return No return value,only performs a check.
#' @export
add_float_range<- function(variable, min, max){
  if(variable<min || variable > max){
    stop(paste(variable, 'argument must be be between',min,'and',max))
  }
}

Try the DIETCOST package in your browser

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

DIETCOST documentation built on June 8, 2025, 1:51 p.m.