plotPerson: Visualise the output of 'summarisePerson()'

View source: R/plotPerson.R

plotPersonR Documentation

Visualise the output of summarisePerson()

Description

Visualise the output of summarisePerson()

Usage

plotPerson(result, variableName = NULL, style = NULL, type = NULL)

Arguments

result

A summarised_result object (output of summarisePerson()).

variableName

The variable to plot, a choice between unique(result$variable_name). If NULL it will only work if only one variable is present in the result object.

style

Visual theme to apply. Character, or NULL. If a character, this may be either the name of a built-in style (see visOmopResults::plotStyle()), or a path to a .yml file that defines a custom style. If NULL, the function will use the explicit default style, unless a global style option is set (see visOmopResults::setGlobalPlotOptions()) or a _brand.yml file is present (in that order).

type

Character string indicating the output plot format. See visOmopResults::plotType() for the list of supported plot types. If type = NULL, the function will use the global setting defined via visOmopResults::setGlobalPlotOptions() (if available); otherwise, a standard ggplot2 plot is produced by default.

Value

A plot visualisation.

Examples


library(OmopSketch)
library(dplyr, warn.conflicts = FALSE)
library(omock)

cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")

result <- summarisePerson(cdm = cdm)

tablePerson(result = result)

cdmDisconnect(cdm = cdm)



OmopSketch documentation built on Aug. 27, 2026, 5:07 p.m.