Learn R Programming

xfun (version 0.48)

is_blank: Test if a character vector consists of blank strings

Description

Return a logical vector indicating if elements of a character vector are blank (white spaces or empty strings).

Usage

is_blank(x)

Value

TRUE for blank elements, or FALSE otherwise.

Arguments

x

A character vector.

Examples

Run this code
xfun::is_blank("")
xfun::is_blank("abc")
xfun::is_blank(c("", "  ", "\n\t"))
xfun::is_blank(c("", " ", "abc"))

Run the code above in your browser using DataLab