R/stop_advices.R

Defines functions stop_advices

stop_advices <- function(df, by, value){

if((by %in% names(df)) == FALSE){ # Checking if the ID's column is in the dataframe
    stop(paste0("The column ", by, " is not in the data frame. Try to run names(df) to check the data frame column names"))
}
if((value %in% names(df)) == FALSE){ # Checking if the ID's column is in the dataframe
    stop(paste0("The column ", value," is not in the data frame. Try to run names(df) to check the data frame column names"))
}
  
}
Nuniemsis/Siane documentation built on May 15, 2018, 4:25 p.m.