R/check_function.R

Defines functions check_function

Documented in check_function

#' Missing value check
#'
#' Checks if there are any missing values in a given column from the dataset.
#' @param name Column in which missing values will be sought.
#' @param column Column name, in string format.
#' @return No return, only performs a check.
#' @export
check_function <- function(name, column){
  if(any(is.na(name))){
    stop(paste('Missing',column,'! Check the food data!'))
  }
}

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.