Learn R Programming

radiant.data (version 0.8.1)

is_empty: Is a character variable defined

Description

Is a character variable defined

Usage

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

Arguments

x

Character value to evaluate

empty

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

Value

TRUE if empty, else FALSE

Details

Is a variable NULL or an empty string

Examples

Run this code
# NOT RUN {
is_empty("")
is_empty(NULL)
is_empty(NA)
is_empty(c())
is_empty("none", empty = "none")
is_empty("")
is_empty("   ")
is_empty(" something  ")

# }

Run the code above in your browser using DataLab