validate_character: Check whether a vector is a character and not of length zero...

View source: R/utilities.R

validate_characterR Documentation

Check whether a vector is a character and not of length zero or "".

Description

This function checks whether a vector is a character and not of length zero or "".

Usage

validate_character(x)

Arguments

x

A vector.

Value

Returns a character vector (if valid) or NA (if not valid).

Examples

validate_character(c("beginning", "progressing", "achieving", "excelling", "", NA, 7))

# [1] "beginning"   "progressing" "achieving"   "excelling"   NA            NA
# [7] "7"


capl documentation built on April 8, 2022, 9:06 a.m.