is_empty: Is a character variable defined

Description Usage Arguments Details Value Examples

View source: R/radiant.R

Description

Is a character variable defined

Usage

1
is_empty(x, empty = "\\s*")

Arguments

x

Character value to evaluate

empty

Indicate what 'empty' means. Default is empty string (i.e., "")

Details

Is a variable NULL or an empty string

Value

TRUE if empty, else FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
is_empty("")
is_empty(NULL)
is_empty(NA)
is_empty(c())
is_empty("none", empty = "none")
is_empty("")
is_empty("   ")
is_empty(" something  ")
is_empty(c("", "something"))
is_empty(c(NA, 1:100))
is_empty(mtcars)

radiant-rstats/radiant.data documentation built on Nov. 13, 2018, 6:57 a.m.