R/check_string.R

Defines functions check_string

Documented in check_string

#' check_string
#'
#' @param table a \code{string} specifying the name of the table
#' @param this_field a \code{string} specifying the name of the field
#' @param this_query a \code{string} specifying the contents of the field
#'
check_string <- function(table,
                         this_field,
                         this_query) {

  if (is.character(this_query)) {
    return(TRUE)
  } else {
    usethis::ui_stop(paste(table, "field", usethis::ui_field(this_field),
                           "is incorrectly formatted"))
  }
}

Try the rDataPipeline package in your browser

Any scripts or data that you put into this service are public.

rDataPipeline documentation built on Nov. 18, 2021, 1:14 a.m.