powered by
This function checks whether a vector is a character and not of length zero or "".
validate_character(x)
A vector.
Returns a character vector (if valid) or NA (if not valid).
# NOT RUN { validate_character(c("beginning", "progressing", "achieving", "excelling", "", NA, 7)) # [1] "beginning" "progressing" "achieving" "excelling" NA NA # [7] "7" # }
Run the code above in your browser using DataLab