R/stop_advices.R

Defines functions stop_advices

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

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 Sept. 10, 2017, 11:18 p.m.