R/is_string.r

Defines functions is_string

Documented in is_string

#' Conditional check for an string value
#'
#' @description Return TRUE if the value is a string (character or factor).
#'
#' @eval arg_vector("x","")
#'
#' @return A boolean vector with the return from the condition check.
#'
#' @export
#'
#' @examples
#'
#' is_string("A")
#'

is_string <- function(x){

  dplyr::if_else(
    condition = is.character(x) | is.factor(x),
    true = TRUE,
    false = FALSE
  )
}
vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.