R/is_col_present.R

Defines functions is_col_present

Documented in is_col_present

#' RM2C2dev
#' @name is_col_present
#' @export
#' @import tidyverse
is_col_present <- function(data, colname) {
  if(is_data_frame_tibble(data)) {
    if(colname %in% colnames(data)) {
      v <- T
    } else{
      v <- F
    }
  } else {
    stop("`data` is not a data.frame or tibble. Please try again.")
  }
  return(v)
}
nelsonroque/ruf documentation built on March 11, 2021, 2:53 p.m.