Learn R Programming

patientProfilesVis (version 2.0.8)

getColorPalettePatientProfile: Get a color palette for patient profile visualizations.

Description

This is a simple wrapper around getColorPalette, with different defaults:

  • inclusion of missing values by default (includeNA set to TRUE)

Usage

getColorPalettePatientProfile(..., includeNA = TRUE)

Value

Vector of shapes, named with the elements in x if x is specified.

Arguments

...

Arguments passed on to clinUtils::getColorPalette

n

Integer of length 1, number of elements in palette.

x

Vector with elements used for palette. If factor, the levels are used, otherwise the unique elements of the vector. Missing values are automatically removed, excepted if includeNA is set to TRUE.

palette

A vector of custom colors, or a function returning this vector from a specific number of colors.
Default is the the colorblind viridis color palette.

includeNA

Logical (TRUE by default), should NA elements be retained in the palette in case x is specified?

Author

Laure Cougnaud

See Also

getColorPalette