getColorPalettePatientProfile: Get a color palette for patient profile visualizations.

View source: R/palettes.R

getColorPalettePatientProfileR Documentation

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)

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?

Value

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

Author(s)

Laure Cougnaud

See Also

getColorPalette


patientProfilesVis documentation built on Nov. 18, 2022, 5:12 p.m.