Skip to contents

This helper function defines a color scheme for visualizations in the {fHMM} package.

Usage

fHMM_colors(controls, colors = NULL)

Arguments

controls

An object of class fHMM_controls. It can be created with set_controls.

colors

Either NULL (default) or a character vector of color names or hexadecimal RGB triplets.

Value

An object of class fHMM_colors, which is:

  • for controls$hierarchy == FALSE a character vector of length controls$states of color codes,

  • for controls$hierarchy == TRUE a list of

    • a character vector of length controls$states[1] and

    • a character matrix of dimensions controls$states

    with color codes.

Examples

if (FALSE) { # \dontrun{
controls <- set_controls()
fHMM_colors(controls, colors = c("red", "blue"))
} # }