Plot the concept counts of a summariseConceptCounts output.
Source:R/plotConceptCounts.R
plotConceptCounts.Rd
Plot the concept counts of a summariseConceptCounts output.
Arguments
- result
A summarised_result object (output of summariseConceptCounts).
- 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()
.
Examples
# \donttest{
library(dplyr, warn.conflicts = FALSE)
cdm <- mockOmopSketch()
result <- cdm |>
summariseConceptCounts(
conceptId = list(
"Renal agenesis" = 194152,
"Manic mood" = c(4226696, 4304866, 37110496, 40371897)
)
)
#> ℹ Getting use of codes from Renal agenesis
#> Getting use of codes ■■■■■■■■■■■■■■■■ 50% | ETA: 2s
#> ℹ Getting use of codes from Manic mood
#> Getting use of codes ■■■■■■■■■■■■■■■■ 50% | ETA: 2s
#> Getting use of codes ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% | ETA: 0s
result |>
filter(estimate_name == "person_count", variable_name == "overall") |>
plotConceptCounts(facet = "codelist_name", colour = "codelist_name")
#> ! The following column type were changed:
#> • variable_name: from integer to character
PatientProfiles::mockDisconnect(cdm)
# }