R/dc_validation_day_notstandard.R

Defines functions dc_validation_day_notstandard

Documented in dc_validation_day_notstandard

#' @rdname dc_validation_day_notstandard
#' 
#' @param TARGET a vector of day information. To pass must be an integer
#' within 1 and 31.
#' 
dc_validation_day_notstandard <- function(TARGET = NULL) {
  suppressWarnings(
    result <- TARGET %>%
      gsub(" ", "", .) %>% # Remove possible spaces
      as.numeric()
  )
  result <- result %% 1 == 0 & result >= 1 & result <= 31
  return(perform_dc_missing(result, TARGET))
}
bd-R/bdchecks documentation built on Oct. 8, 2021, 5:10 p.m.