chk_color: Check Color String

Description Usage Arguments Value Functions See Also Examples

View source: R/chk.R

Description

Checks that x is a string (non-missing character vector of length 1) that specifies a color.

chk_color checks if a color string.

chk_colour checks if a color string.

Usage

1
2
3
chk_color(x, x_name = NULL)

chk_colour(x, x_name = NULL)

Arguments

x

The object to check.

x_name

A string of the name of object x or NULL.

Value

NULL, invisibly. Called for the side effect of throwing an error if the condition is not met.

Functions

See Also

vld_color()

Examples

1
2
3
4
5
6
7
# chk_color
chk_color("blue")
try(chk_color("glue"))

# chk_colour
chk_colour("blue")
try(chk_colour("glue"))

poissonconsulting/tinter documentation built on Aug. 14, 2020, 4:16 p.m.