Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Curated Datasets and Tools for Epidemiological Data Analysis
Version:0.1.1
Maintainer:Natàlia Pallarès <npallares@igtp.cat>
Description:Curated datasets and intuitive data management functions to streamline epidemiological data workflows. It is designed to support researchers in quickly accessing clean, structured data and applying essential cleaning, summarizing, visualization, and export operations with minimal effort. Whether you're preparing a cohort for analysis or creating reports, 'DIVINE' makes the process more efficient, transparent, and reproducible.
License:GPL (≥ 3)
Encoding:UTF-8
RoxygenNote:7.3.3
URL:https://bruigtp.github.io/DIVINE/
BugReports:https://github.com/bruigtp/DIVINE/issues
Suggests:knitr, rmarkdown
VignetteBuilder:knitr
Depends:R (≥ 4.1)
LazyData:true
Imports:dplyr, fmsb, ggplot2, gtsummary, haven, openxlsx, plotly,purrr, rlang, scales, stringr, tibble, tidyselect
NeedsCompilation:no
Packaged:2025-12-11 07:29:02 UTC; jcarmezim
Author:Natàlia Pallarès [aut, cre], João Carmezim [aut], Pau Satorra [aut], Lucia Blanc [aut], Cristian Tebé [aut]
Repository:CRAN
Date/Publication:2025-12-11 07:50:02 UTC

DIVINE's table on laboratory data

Description

Information on laboratory data of patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(analytics)

Format

A data frame with 5813 rows and 9 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

analytics_available:

Is there an analytic available for this patient?

total_leukocytes:

Total leukocytes (mil/mm³)

hemoglobin:

Hemoglobin (g/dl)

total_lymphocytes:

Total lymphocytes (mil/mm³)

d_dimer:

D-dimer (µg/L)

c_reactive_protein:

C-reactive protein (mg/L)

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on information about comorbidities

Description

Information about comorbidities of patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(comorbidities)

Format

A data frame with 5813 rows and 37 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

sociofunctional:

A factor with levels⁠Lives with a spouse of similar age⁠,⁠Lives with a spouse with some degree of dependency⁠,⁠Lives with a non-family caregiver⁠,⁠Lives with family. The caregiver is not their spouse⁠,⁠Lives with family without physical dependency⁠,⁠Lives alone and has no children or they are far away⁠,⁠Lives alone and has nearby children⁠. Sociofunctional status

frailty:

A factor with levelsNo,PCC andMACA. Is the patient a chronic complex patient (PCC) or a patient with advanced chronic disease (MACA)?

barthel_score:

Punctuation in the Barthel scale used to measure performance in activities of daily living

weight:

Weight (kg)

height:

Height (cm)

body_mass_index:

Body mass index computed as\frac{\mbox{weight (kg)}}{\mbox{height (m)}^2}

dm:

A factor with levelsNo andYes. Diabetes mellitus Type 2

type_dm:

A factor with levels⁠With target organ involvement⁠ and⁠Without complications⁠. For patients with diabetes mellitus type 2, type of disease

chronic_lung_disease:

A factor with levelsNo andYes. Chronic lung disease (including COPD, asthma and obstructive sleep apnea, among others)

chronic_kidney_disease:

A factor with levelsNo andYes. Severe chronic kidney disease

mild_kidney_disease:

A factor with levelsNo andYes. Mild kidney disease

renal_therapy:

A factor with levelsNo andYes. Is the patient currently receiving renal replacement therapy?

heart_disease:

A factor with levelsNo andYes. Heart failure

coronary_disease:

A factor with levelsNo andYes. Coronary heart disease

myocardial_infarction:

A factor with levelsNo andYes. Has the patient ever had a heart attack?

hematologic_neo:

A factor with levelsNo andYes. Haematological neoplasia

hematologic_neo_type:

A factor with levelsLeukemia,Lymphoma andMyeloma. For patients with Haematological neoplasia, type of disease.

non_metastatic_neo:

A factor with levelsNo andYes. Non-Metastatic Neoplasia

metastatic_neo:

A factor with levelsNo andYes. Metastatic Neoplasia

stroke_tia:

A factor with levelsNo andYes. Has the patient ever had a stroke or a transient ischemic attack?

peripheral_vasculopathy:

A factor with levelsNo andYes. Peripheral artery disease

dementia:

A factor with levelsNo andYes. Dementia

mild_liver_disease:

A factor with levelsNo andYes. Mild liver disease

severe_liver_disease:

A factor with levelsNo andYes. Severe liver disease

connective_tissue_disease:

A factor with levelsNo andYes. Connective tissue disease

peptic_ulcer:

A factor with levelsNo andYes. Peptic ulcer

hemiplegia:

A factor with levelsNo andYes. Hemiplegia

hiv:

A factor with levelsNo andYes. Human immunodeficiency virus

charlson_index:

Value of the Charlson Comorbidity Index. This index predicts the ten-year mortality for a patient given the information of their comorbid conditions

hypertension:

A factor with levelsNo andYes. Hypertension

dyslipidemia:

A factor with levelsNo andYes. Dyslipidemia

depression:

A factor with levelsNo andYes. Depression

ceiling:

A factor with levels⁠Oxygen mask⁠ (non-rebreather oxygen mask),⁠HFNC or NIMV⁠ (high-flow nasal cannula or non-invasive mechanical ventilation) and⁠IMV and ICU admission⁠ (invasive mechanical ventilation and acces to intensive care unit). Therapeutic ceiling of care assigned to the patient

ceiling_dico:

A factor with the dichotomization of the variable ceiling in two levelsNo (⁠IMV and ICU admission⁠) andYes (⁠Oxygen mask⁠ and⁠HFNC or NIMV⁠)

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on complications data

Description

Information on complications data of patients included in the DIVINE cohort. Data was collected during hospitalization.

Usage

data(complications)

Format

A data frame with 5813 rows and 9 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

comp:

A factor with levelsNo andYes. Did the patient experiment a complication while hospitalised?

kidney_failure:

A factor with levelsNo andYes. Did the patient experiment kidney failure during hospital admission?

mental_status_change:

A factor with levelsNo andYes. Did the patient experiment a change in its mental status during hospital admission?

nosocomial_infection:

A factor with levelsNo andYes. Did the patient experiment a nosocomial infection during hospital admission?

comp_cardiac:

A factor with levelsNo andYes. Did the patient experiment a cardiac complication during hospital admission? Cardiac complications included heart failure and acute coronary event.

comp_respiratory:

A factor with levelsNo andYes. Did the patient experiment a respiratory complication during hospital admission? Respiratory complications included acute respiratory failure, venous thromboembolism, and pneumonia.

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on treatments previous to hospital admission

Description

Information on previous treatments for patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(concomitant_medication)

Format

A data frame with 5813 rows and 11 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

statins_pre:

A factor with levelsNo andYes. Previous treatment with statins

cortis_pre:

A factor with levelsNo andYes. Previous treatment with corticosteroids

acei_pre:

A factor with levelsNo andYes. Previous treatment with angiotensin-converting enzyme (ACE) inhibitors

ara2_pre:

A factor with levelsNo andYes. Previous treatment with angiotensin II receptor antagonists (ARA-II)

cortis_systemic_pre:

A factor with levelsNo andYes. Routine treatment with systemic corticosteroids

cortis_inhaled_pre:

A factor with levelsNo andYes. Routine treatment with inhaled corticosteroids

anticoagulants_pre:

A factor with levelsNo andYes. Previous treatment with anticoagulants

immunosuppre_pre:

A factor with levelsNo andYes. Previous treatment with immunosuppressants

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


Data Overview Function

Description

This function provides a comprehensive overview of a data frame, including itsdimensions, variable types, missing values count and a preview of the first few rows.

Usage

data_overview(data, preview_rows = 6)

Arguments

data

A data frame. The dataset for which you want an overview.

preview_rows

Integer. The number of rows to display in the preview. Default is 6.

Details

The function is useful for quickly inspecting the structure of a data frame andidentifying any missing values or general characteristics of the data. It also allowsusers to customize how many rows they want to preview from the dataset.

Value

A list containing the following components:

dimensions

A vector of two elements: the number of rows and columns in the data.

variable_types

A named vector with the class of each variable (column) in the data.

missing_values

A named vector with the count of missing values (NA) for each variable.

preview

A data frame showing the firstpreview_rows rows of the dataset.

Examples

# Example usage with a simple data framedata <- data.frame(  Age = c(25, 30, NA, 22, 35),  Height = c(175, 160, 180, NA, 165),  Gender = c("Male", "Female", "Female", "Male", "Male"))overview <- data_overview(data, preview_rows = 4)print(overview)# Example usage with the default preview size (6 rows)overview_default <- data_overview(data)print(overview_default)

DIVINE's demographic table

Description

Demographic data of patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(demographic)

Format

A data frame with 5813 rows and 8 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

sex:

A factor with levelsMale andFemale. Sex at birth

age:

Age at hospital admission

smoker:

A factor with levelsEx-smoker,No andYes. Smoking status

alcohol:

A factor with levelsNo andYes. Consumption of alcohol

residence_center:

A factor with levelsNo andYes. Is the patient currently living in a long-term facility?

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on closure data

Description

Information on closure data of patients included in the DIVINE cohort. Data was collected at the end of hospitalization.

Usage

data(end_followup)

Format

A data frame with 5813 rows and 8 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

clinical_stability_days:

Days from hospital admission to clinical stability

exitus:

A factor with levelsNo andYes. Did the patient die during hospital admission?

exitus_days:

Days from hospital admission to exitus

discharge:

A factor with levelsNo andYes. Was the patient discharge from the hospital?

discharge_days:

Days from hospital admission to discharge

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


Export Data to Various Formats

Description

Export a dataframe or tibble to multiple file formats. Ifformat is NULL (default),the format will be inferred from the file extension ofpath. Ifformat is providedand the extension inpath does not match, the function will update the path touse the extension that corresponds toformat and warn the user.

Usage

export_data(data = NULL, path = NULL, format = NULL)

Arguments

data

A dataframe or tibble to export.

path

A character string specifying the file path for the exported file.

format

Optional character string specifying the export format. Supported formats:"xlsx", "csv", "rds", "txt", "sav", "dta", "sas7bdat" (alias "xpt"). If NULL (default),the function infers the format from thepath extension.

Details

Supported formats and their functionality are provided via the package dependencies:

Value

This function does not return a value. It writes the data to the specified file path and displays a success message upon completion.

Examples

## Not run: df <- data.frame(Name = c("Alice", "Bob"), Age = c(25, 30))# Infer format from path extension (no format argument)export_data(df, path = "example.xlsx")export_data(df, path = "example.csv")# Explicit format (function will ensure path extension matches)export_data(df, format = "csv", path = "example")         # adds .csvexport_data(df, format = "rds", path = "example.rds")## End(Not run)

DIVINE's table on icu data

Description

Information on ICU data of patients included in the DIVINE cohort. Data was collected during hospitalization.

Usage

data(icu)

Format

A data frame with 5813 rows and 14 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

icu:

A factor with levelsNo andYes. Was the patient admitted to the ICU?

icu_enter_days:

Days from hospital admission to ICU admission.

icu_exit_days:

Days from hospital admission to ICU discharge.

vent_mec:

A factor with levelsNo andYes. Did the patient received invasive mechanical ventilation?

vent_mec_start_days:

Days from hospital admission to start of invasive mechanical ventilation.

vent_mec_end_days:

Days from hospital admission to end of invasive mechanical ventilation.

vent_mec_no_inv:

A factor with levelsNo andYes. Did the patient received non-invasive mechanical ventilation?

vent_mec_no_inv_start_days:

Days from hospital admission to start of non-invasive mechanical ventilation.

vent_mec_no_inv_end_days:

Days from hospital admission to end of non-invasive mechanical ventilation.

sev_pneum

A factor with levelsNo andYes. Did the patient required a sustained supply of oxygen therapy greater than FiO2 of 35% to maintain oxygen saturation above 95%?

sev_pneum_days

Days from hospital admission to development of severe pneumonia.

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


Replace Missing Values

Description

Replace missing values (NA) in a data.frame with a specified value or method (such as mean, median, mode, constant, or custom function),applying imputation column-wise.

Usage

impute_missing(  data,  method = list(dplyr::where(is.numeric) ~ "mean", dplyr::where(is.character) ~ "mode",    dplyr::where(is.factor) ~ "mode"),  filter_by = NULL,  drop_all_na = FALSE,  verbose = TRUE)

Arguments

data

A data frame. The dataset in which missing values should be imputed.

method

A list of one-sided formulas of the form⁠<selector> ~ <value>⁠.Supported⁠<value>⁠ options are:

  • "mean": replace with the column mean (numeric columns only).

  • "median": replace with the column median (numeric columns only).

  • "mode": replace with the most frequent value (works for numeric, character, or factor).

  • A numeric constant: replace with that constant (numeric columns).

  • A character constant: replace with that value (character/factor columns).

  • A function: a function⁠function(col)⁠ that receives the column and returns a single value to be used as replacement for NA.

The default islist(dplyr::where(is.numeric) ~ "mean",dplyr::where(is.character) ~ "mode",dplyr::where(is.factor) ~ "mode").

filter_by

Character vector of column names. If provided, only rows that haveall specified columns non-NA are kept (appliedbefore imputation).

drop_all_na

Logical; ifTRUE, rows whereall columns areNA are removedbefore imputation.

verbose

Logical; ifTRUE (default) print a concise final summary of what was imputed. Set toFALSE to suppress messages.

Details

You can remove rows that are entirelyNA before imputation usingdrop_all_na, or filter rows based on specific variables usingfilter_by.

Value

A tibble with missing values replaced according to the provided specifications.

Examples

# Impute all numeric columns by their means:impute_missing(icu)# Impute numeric columns by median:impute_missing(  icu,  method = list(where(is.numeric) ~ "median"))# Keep only rows where both "vent_mec_no_inv" and "vent_mec" are non-missing:impute_missing(  icu,  filter_by = c("vent_mec_no_inv", "vent_mec"))

DIVINE's table on antibiotics received during hospitalization

Description

Information on antibiotics received for patients included in the DIVINE cohort. Data was collected during hospitalization.

Usage

data(inhosp_antibiotics)

Format

A data frame with 5813 rows and 17 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

any_antibiotic:

A factor with levelsNo andYes. Did the patient receive treatment with antibiotics during hospital admission?

amoxicillin:

A factor with levelsNo andYes. Treatment with amoxicillin

amoxicillin_clavulanic_acid:

A factor with levelsNo andYes. Treatment with amoxicillin and clavulanic acid

azithromycin:

A factor with levelsNo andYes. Treatment with azithromycin

ceftriaxone:

A factor with levelsNo andYes. Treatment with ceftriaxone

ciprofloxacin:

A factor with levelsNo andYes. Treatment with ciprofloxacin

cotrimoxazole:

A factor with levelsNo andYes. Treatment with cotrimoxazole

levofloxacin:

A factor with levelsNo andYes. Treatment with levofloxacin

linezolid:

A factor with levelsNo andYes. Treatment with linezolid

meropenem:

A factor with levelsNo andYes. Treatment with meropenem

piperacillin:

A factor with levelsNo andYes. Treatment with piperacillin

piperacillin_tazobactam:

A factor with levelsNo andYes. Treatment with piperacillin+tazobactam

teicoplanin:

A factor with levelsNo andYes. Treatment with teicoplanin

other_antibiotic:

A factor with levelsNo andYes. Treatment with another antibiotic

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on antivirals received during hospitalization

Description

Information on antivirals for patients included in the DIVINE cohort. Data was collected during hospitalization.

Usage

data(inhosp_antivirals)

Format

A data frame with 5813 rows and 10 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

any_antiviral:

A factor with levelsNo andYes. Did the patient receive treatment with antivirals during hospital admission?

hydroxychloroquine:

A factor with levelsNo andYes. Treatment with hydroxychloroquine

interferon_b:

A factor with levelsNo andYes. Treatment with interferon beta

kaletra_ritonavir_lopinavir:

A factor with levelsNo andYes. Treatment with kaletra/ritonavir-lopinavir

remdesivir:

A factor with levelsNo andYes. Treatment with remdesivir

tocilizumab:

A factor with levelsNo andYes. Treatment with tocilizumab

other_antiviral:

A factor with levelsNo andYes. Treatment with another antiviral

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on other treatments received during hospitalization.

Description

Information on other treatments for patients included in the DIVINE cohort. Data was collected during hospitalization.

Usage

data(inhosp_other_treatments)

Format

A data frame with 5813 rows and 6 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

corticosteroids:

A factor with levelsNo andYes. Treatment with corticosteroids

lmwh:

A factor with levelsNo andYes. Treatment with low-molecular-weight heparin (LMWH)

oral_anticoagulants:

A factor with levelsNo andYes. Treatment with oral anticoagulants

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


Multi-Dataset Join Utility

Description

This function performs a sequential join of multiple datasets by a specified key column.

Usage

multi_join(  datasets,  key = c("record_id", "covid_wave", "center"),  join_type = "left")

Arguments

datasets

A list of data frames to be joined.

key

A character string representing the key column to join by. Defaults to "record_id".

join_type

A character string specifying the type of join. Options are "left", "right", "inner", or "full".

Value

A single data frame containing the joined datasets.

Examples

multi_join(  list(analytics, comorbidities),  join_type = "left")multi_join(  list(analytics, comorbidities),  key = c("record_id", "covid_wave", "center"),  join_type = "left")

multi_plot: Flexible Static or Interactive Plotting of Variables

Description

Generate a variety of plots—histogram, density, boxplot, barplot, violin, scatter,heatmap, or spider (radar)—either as static ggplot2 objects or interactive Plotly widgets.

Usage

multi_plot(  data,  x = NULL,  y = NULL,  plot_type = NULL,  interactive = FALSE,  fill_color = "steelblue",  color = "black",  bin_width = NULL,  group = NULL,  facet = NULL,  radar = NULL,  radar_color = "steelblue",  radar_labels = NULL,  radar_cex = 1,  radar_ref_lev = "Yes",  title = NULL,  x_lab = NULL,  y_lab = NULL,  legend_position = "right",  axis_text_angle = 0,  axis_text_size = 12,  title_size = 14,  theme_custom = ggplot2::theme_minimal())

Arguments

data

A data frame or tibble containing your data.

x

Character; name of the variable for x-axis (required for all plot types except spider).

y

Character; name of the variable for y-axis (required for boxplot, violin, scatter, and heatmap).

plot_type

Character; one of"histogram","density","boxplot","barplot","violin","scatter","heatmap", or"spider".

interactive

Logical; ifTRUE, returns a Plotly interactive plot(not available for spider/radar charts). Default:FALSE.

fill_color

Character; fill color for non-grouped geoms (default"steelblue").

color

Character; outline/line color (default"black").

bin_width

Numeric; bin width for histograms. IfNULL, computed automatically.

group

Character; name of grouping variable (optional).

facet

Character; name of variable to facet by (optional).

radar

Character vector; names of exactly 5 variables for spider plot (only for"spider").

radar_color

Character or vector; border/fill color for spider chart (only for"spider").

radar_labels

Character or vector; names of the variables for spider chart (only for"spider").

radar_cex

Numeric; font size for variable labels in the spider chart (only for"spider").

radar_ref_lev

Character; reference level for factors included in the spider chart (only for"spider").

title

Character; plot title (optional).

x_lab

Character; x-axis label (defaults tox).

y_lab

Character; y-axis label (defaults toy or"Count").

legend_position

Character; one of"right","left","top","bottom","none" (default"right").

axis_text_angle

Numeric; rotation angle (degrees) for x-axis tick labels (default0).

axis_text_size

Numeric; size of axis text in pts (default12).

title_size

Numeric; size of plot title text in pts (default14).

theme_custom

A ggplot2 theme object (defaulttheme_minimal()).

Details

Value

Aggplot object (ifinteractive = FALSE orplot_type = "spider")or aplotly object (ifinteractive = TRUE).

Examples

multi_plot(icu,  x = "icu_enter_days",  y = "vent_mec_start_days",  plot_type = "scatter",  color = "darkred",  title = "ICU exit vs MV days")multi_plot(  comorbidities,  radar = c("hypertension", "dyslipidemia", "depression", "mild_kidney_disease", "dm"),  radar_color = "steelblue",  radar_ref_lev = "Yes",  plot_type = "spider")

DIVINE's table on severity scores at hospital admission

Description

Information on severity scores at hospital admission for patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(scores)

Format

A data frame with 5813 rows and 10 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

psi:

Pneumonia severity index (PSI) at hospital admission

group_psi:

A factor with levels1,2,3, and4. PSI group

curb65:

CURB65 score at hospital admission

group_curb65:

A factor with levels1,2, and3. CURB65 group

mulbsta:

MULBSTA score at hospital admission

group_mulbsta:

A factor with levelsLow-risk andHigh-risk. MULBSTA group

rox_index:

ROX index at hospital admission

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


Create Summary Table

Description

This function generates a summary table using thegtsummary package.It allows customization of the reported statistics for continuous variables and categorical variables.Users can optionally include p-values for group comparisons and managethe reporting of missing values.

Usage

stats_table(  data,  vars = NULL,  var_labels = NULL,  by = NULL,  statistic_type = "mean_sd",  pvalue = FALSE,  test_method = NULL,  include_na = TRUE)

Arguments

data

A data frame containing the dataset.

vars

A character vector of variable names to include in the summary. If NULL (default), all variables are included.

var_labels

A list of labels to replace variable names in the table.

by

A character string specifying a grouping variable. If NULL (default), no grouping is applied.

statistic_type

A character string specifying the type of statistic to reportfor continuous variables. Options are:

  • "mean_sd": Mean (SD) for continuous variables.

  • "median_iqr": Median (Q1; Q3) for continuous variables.

  • "both": Both Mean (SD) and Median (Q1; Q3).

pvalue

A logical value indicating whether to include p-values in the summary. Defaults to FALSE.

test_method

Optional. Only used ifpvalue = TRUE. A list specifying custom statistical tests for each variable. If NULL,gtsummary will choose default tests based on variable type.

include_na

A logical value indicating whether to include rows with missing values in the output. Defaults to TRUE.

Value

A gtsummary table object.

Examples

# Mean ± SD summarystats_table(  vital_signs,  vars = c("temperature", "saturation"),  by = "supporto2",  statistic_type = "mean_sd")# Both mean ± SD and median [Q1; Q3]stats_table( vital_signs, statistic_type = "both", include_na = FALSE)# Add p-value with default testsstats_table( vital_signs, vars = c("temperature", "saturation"), by = "supporto2", pvalue = TRUE)# Add p-value and define methodstats_table( vital_signs, vars = c("temperature", "saturation"), by = "supporto2", pvalue = TRUE, test_method = list(temperature ~ "t.test"))

DIVINE's symptoms table

Description

Information on COVID-19 associated symptoms of patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(symptoms)

Format

A data frame with 5813 rows and 24 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

symptoms_days:

Days from symptoms onset to hospitalization

rhinorrhea:

A factor with levelsNo andYes. Rhinorrhea

anosmia:

A factor with levelsNo andYes. Anosmia

ageusia:

A factor with levelsNo andYes. Ageusia

arthromyalgia:

A factor with levelsNo andYes. Arthromyalgia

odynophagia:

A factor with levelsNo andYes. Odynophagia

fever:

A factor with levelsNo andYes. Fever

cough:

A factor with levelsNo andYes. Cough

dyspnea:

A factor with levelsNo andYes. Dyspnoea

expectoration:

A factor with levelsNo andYes. Expectoration

diarrhea:

A factor with levelsNo andYes. Diarrhea

vomit:

A factor with levelsNo andYes. Vomiting

nausea:

A factor with levelsNo andYes. Nausea

asthenia:

A factor with levelsNo andYes. Asthenia

anorexia:

A factor with levelsNo andYes. Anorexia

cephal:

A factor with levelsNo andYes. Headache

chest_pain:

A factor with levelsNo andYes. Chest pain

abdominal_pain:

A factor with levelsNo andYes. Abdominal pain

confusional_syndrome:

A factor with levelsNo andYes. Confusional syndrome

shock_admission:

A factor with levelsNo andYes. Shock on admission

bacterial_infection:

A factor with levelsNo andYes. Bacterial infection

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's vaccine table

Description

Information on COVID-19 vaccines of patients included in the DIVINE cohort. Data was collected at hospital admission and it is available for waves 3 and 5 (patients were not yet vaccinated in waves 1 and 2).

Usage

data(vaccine)

Format

A data frame with 5813 rows and 6 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

vaccine:

A factor with levelsNo,Yes and⁠Not applicable⁠ (for patients included in waves before vaccination started). Is the patient vaccinated for COVID-19?

complete_vaccine:

A factor with levelsNo,Partial,Complete and⁠Not applicable⁠ (for patients included in waves before vaccination started). Is the patient partially vaccinated (one dose of two-dose vaccines), completely vaccinated (one dose for one-dose vaccines or two doses for two-dose vaccines) or not vaccinated at all?

immune_vaccine:

A factor with levels⁠No immunity⁠,⁠Partial immunity⁠,⁠Total immunity⁠ and⁠Not applicable⁠ (for patients included in waves before vaccination started). Defines the level of immunity of the patient: not vaccinated (⁠No immunity⁠), vaccinated with only one dose for two-dose vaccines (⁠Partial immunity⁠), vaccinated with two doses but less than 7 days have passed since the second dose (⁠Partial immunity⁠) or vaccinated with all the doses and more than 7 days have passed since the second dose (⁠Total immunity⁠)

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


DIVINE's table on vital signs

Description

Information on vital signs of patients included in the DIVINE cohort. Data was collected at hospital admission.

Usage

data(vital_signs)

Format

A data frame with 5813 rows and 13 columns

record_id:

Identifier of each record. This information does not match the real data.

covid_wave:

A factor with levels⁠Wave 1⁠,⁠Wave 2⁠,⁠Wave 3⁠, and⁠Wave 5⁠. COVID-19 wave.

center:

A factor with levels⁠Hospital A⁠,⁠Hospital B⁠,⁠Hospital C⁠,⁠Hospital D⁠, and⁠Hospital E⁠. Center of admission

temperature:

Human body temperature (ºC)

fio2_contributed:

Fraction of inspired oxygen (%)

syst_blood_press:

Systolic blood pressure (mmHg)

diast_blood_press:

Diastolic blood pressure (mmHg)

saturation:

Oxygen saturation (%)

cardiac_freq:

Heart rate (bpm)

supporto2:

A factor with levelsNo andYes. Oxygen Support

normal_radio:

A factor with levelsNo andYes. Normal X-ray

pleural_effusion:

A factor with levelsNo andYes. Pleural effusion

saturation_fio2:

Oxygen Saturation to FiO2 Ratio

References

Pallarès, N., Tebé, C., Abelenda-Alonso, G., Rombauts, A., Oriol, I., Simonetti, A. F., Rodríguez-Molinero, A., Izquierdo, E., Díaz-Brito, V., Molist, G., Gómez Melis, G., Carratalà, J., Videla, S., & MetroSud and Divine study groups (2023). Characteristics and Outcomes by Ceiling of Care of Subjects Hospitalized with COVID-19 During Four Waves of the Pandemic in a Metropolitan Area: A Multicenter Cohort Study. Infectious diseases and therapy, 12(1), 273–289. https://doi.org/10.1007/s40121-022-00705-w


[8]ページ先頭

©2009-2025 Movatter.jp