getShapePalettePatientProfile: Get a shape palette for patient profile visualizations.

View source: R/palettes.R

getShapePalettePatientProfileR Documentation

Get a shape palette for patient profile visualizations.

Description

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

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

  • the extraction of shapes as text by default (asText set to TRUE)

Usage

getShapePalettePatientProfile(..., includeNA = TRUE, asText = TRUE)

Arguments

...

Arguments passed on to clinUtils::getShapePalette

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 shapes, or a function returning this vector from a specific number of shapes.
The vector should be a character if asText is set to TRUE.
Default is the clinShapes shape palette, or clinShapesText if asText is set to TRUE.

includeNA

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

asText

Logical (TRUE by default), should the palette be expressed as integer (base R plot and ggplot2 compatible) or in text format (e.g. required if combined with unicode symbols in ggplot2)?

Value

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

Author(s)

Laure Cougnaud

See Also

getShapePalette


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