plotInObservation: Create a ggplot2 plot from the output of...

View source: R/plotInObservation.R

plotInObservationR Documentation

Create a ggplot2 plot from the output of summariseInObservation()

Description

[Deprecated]

Usage

plotInObservation(result, facet = NULL, colour = NULL)

Arguments

result

A summarised_result object (output of summariseInObservation()).

facet

Columns to face by. Formula format can be provided. See possible columns to face by with: visOmopResults::tidyColumns().

colour

Columns to colour by. See possible columns to colour by with: visOmopResults::tidyColumns().

Value

A plot visualisation.

Examples


library(dplyr)
library(OmopSketch)
library(omock)

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

result <- summariseInObservation(
  observationPeriod = cdm$observation_period,
  output = c("person-days", "record"),
  ageGroup = list("<=40" = c(0, 40), ">40" = c(41, Inf)),
  sex = TRUE
)

result |>
  filter(variable_name == "Person-days") |>
  plotInObservation(facet = "sex", colour = "age_group")

cdmDisconnect(cdm = cdm)



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