chk_color {tinter}R Documentation

Check Color String

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

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


# chk_color
chk_color("blue")
try(chk_color("glue"))

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

[Package tinter version 0.1.0 Index]