View source: R/plotInObservation.R
plotInObservation | R Documentation |
Create a ggplot2 plot from the output of summariseInObservation().
plotInObservation(result, facet = NULL, colour = NULL)
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: |
colour |
Columns to colour by. See possible columns to colour by with:
|
A ggplot showing the table counts
library(dplyr)
cdm <- mockOmopSketch()
result <- summariseInObservation(
cdm$observation_period,
output = c("person-days","record"),
ageGroup = list("<=40" = c(0, 40), ">40" = c(41, Inf)),
sex = TRUE
)
result |>
filter(variable_name == "Number person-days") |>
plotInObservation(facet = "sex", colour = "age_group")
PatientProfiles::mockDisconnect(cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.