hiliteColor {dynamicnetwork}R Documentation

Maps boolean values to red and black color names

Description

Used as a color function for taking a vector of booleans (like infection status) and create a vector of color names to be used in a plot.

Usage

hiliteColor(values)

Arguments

values vector of boolean values

Details

Replaces all TRUE values with the string 'Red', all FALSE values with the string 'Black'.

Value

character vector of color names

Author(s)

skyebend@skyeome.net

Examples


## The function is currently defined as
function (values) 
{
    values <- replace(values, values == TRUE, "Red")
    values <- replace(values, values == FALSE, "Black")
    return(values)
  }

[Package dynamicnetwork version 0.0-4 Index]