This helper function defines a color scheme for visualizations in the {fHMM} package.
Arguments
- controls
An object of class
fHMM_controls
. It can be created withset_controls
.- colors
Either
NULL
(default) or acharacter
vector of color names or hexadecimal RGB triplets.
Value
An object of class fHMM_colors
, which is:
for
controls$hierarchy == FALSE
acharacter
vector of lengthcontrols$states
of color codes,for
controls$hierarchy == TRUE
alist
ofa
character
vector of lengthcontrols$states[1]
anda
character
matrix of dimensionscontrols$states
with color codes.
Examples
if (FALSE) { # \dontrun{
controls <- set_controls()
fHMM_colors(controls, colors = c("red", "blue"))
} # }