populationAge: Age distribution comparison: patients subset vs all...

Description Usage Arguments Value Examples

View source: R/populationAge.R

Description

Given an object of class comoRbidity the age distribution of your patients of interest (those that have at least one code of the ones contained in indexDiseaseCodes.txt file) is represent comparing with the age distribution of the your whole patients database.

Usage

1
2
3
populationAge(input, codesPth, databasePth, type = "together",
  disorderColor = "gold", allColor = "darkblue", interactive = FALSE,
  verbose = FALSE, warnings = TRUE)

Arguments

input

A comorbidity object, obtained with the query function.

codesPth

Determines the path where the file with the index diseases is located (indexDiseaseCode)

databasePth

Determines the path where the three required input files (patientData, diagnosisData, admissionData) are located.

type

by Befault 'together'. This argument allows the user to select the output barplot type. The other possible option is 'separate'

disorderColor

Determines the bar color representing the disorder patients. By default gold.

allColor

Determines the bar color representing the whole population. By default darkblue.

interactive

Determines if the output barplot is interactive or not. By default the interactive argument is set up as FALSE. The value of the argument can be changed to TRUE, as a result an interactive barplot will be obtained.

verbose

By default FALSE. Change it to TRUE to get a on-time log from the function.

warnings

By default TRUE. Change it to FALSE to don't see the warnings.

Value

A barplot comparing the ages distributions

Examples

1
2
3
4
5
6
load(system.file("extdata", "comorbidity.RData", package="comoRbidity"))
popAge <- populationAge( input       = comor_obj, 
                         codesPth    = system.file("extdata", package="comoRbidity"), 
                         databasePth = system.file("extdata", package="comoRbidity"),
                         type        = "separate"
              )

aGutierrezSacristan/comorbidity documentation built on April 10, 2020, 5:54 p.m.