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 acharactervector of color names or hexadecimal RGB triplets.
Value
An object of class fHMM_colors, which is:
for
controls$hierarchy == FALSEacharactervector of lengthcontrols$statesof color codes,for
controls$hierarchy == TRUEalistofa
charactervector of lengthcontrols$states[1]anda
charactermatrix of dimensionscontrols$states
with color codes.
Examples
if (FALSE) { # \dontrun{
controls <- set_controls()
fHMM_colors(controls, colors = c("red", "blue"))
} # }
