R/check_nom_num_df.R

Defines functions check_nom_num_df

Documented in check_nom_num_df

#' Applies non-nummeric value check to entire dataframe
#'
#' Checks if values supposed to be numeric are in fact numeric.
#' @param df Dataframe columns.
#' @return No return, only performs a check.
#' @export
check_nom_num_df <- function(df){
  if(0 %in% lapply(df, check_non_num)){
    stop("Non-nummerical entries in nutrient targets dataset aren't allowed. Check your 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.