Skip to contents

`r lifecycle::badge("deprecated")`

Usage

plotLargeScaleCharacteristics(
  data,
  xAxis = "variable_name",
  yAxis = "estimate_value",
  facetVarX = c("variable_name"),
  facetVarY = c("group_level", "strata_level", "estimate_name"),
  colorVars = "variable_level",
  vertical_x = FALSE
)

Arguments

data

output of summariseLargeScaleCharacteristics.

xAxis

what to plot on x axis, default as variable_name column. Has to be a column in data.

yAxis

what to plot on y axis, default as estimate_value column. Has to be a column in data. One of the xAxis or yAxis has to be estimate_value.

facetVarX

column in data to facet by on horizontal axis

facetVarY

column in data to facet by on vertical axis

colorVars

column in data to color by.

vertical_x

whether to display x axis string vertically.

Value

A ggplot.

Examples

# \donttest{
library(PatientProfiles)
cdm <- PatientProfiles::mockPatientProfiles()

concept <- dplyr::tibble(
  concept_id = c(1125315, 1503328, 1516978, 317009, 378253, 4266367),
  domain_id = NA_character_,
  vocabulary_id = NA_character_,
  concept_class_id = NA_character_,
  concept_code = NA_character_,
  valid_start_date = as.Date("1900-01-01"),
  valid_end_date = as.Date("2099-01-01")
) %>%
  dplyr::mutate(concept_name = paste0("concept: ", .data$concept_id))
cdm <- CDMConnector::insertTable(cdm, "concept", concept)
results <- cdm$cohort2 %>%
  summariseLargeScaleCharacteristics(
    episodeInWindow = c("condition_occurrence"),
    minimumFrequency = 0
  )
#> Warning: `summariseLargeScaleCharacteristics()` was deprecated in PatientProfiles 0.8.0.
#>  Please use `CohortCharacteristics::summariseLargeScaleCharacteristics()`
#>   instead.
#> ! The following variables: result_type, package_name, package_version; were added to `settings`
graphs <- plotLargeScaleCharacteristics(results)
CDMConnector::cdmDisconnect(cdm = cdm)
# }