getData4sauerst: Get data on the oxygen therapy (supplemental oxygen) (?).

View source: R/getData4sauerst.R

getData4sauerstR Documentation

Get data on the oxygen therapy (supplemental oxygen) (?).

Description

If the column APO2APP in the table FRM_O2A or POXYAPP in the table FRM_O2P contains a value other than -1 or 1 then oxygen was supplemented.

Usage

getData4sauerst(FRM_O2A, FRM_O2P)

Arguments

FRM_O2A

data.table containing the table FRM_O2A from the database of the PROGRESS study

FRM_O2P

data.table containing the table FRM_O2P from the database of the PROGRESS study

Value

data.table with the ID of the patient (patstuid), and the data on the oxygen therapy, in the wide format.

Examples

## Not run: 
excel_fn <- paste0("/net/ifs1/san_projekte/projekte/",
"PROGRESS/Datenmanagement/Data_freezes/",
"20190320/PROGRESS-freeze_201903_01.xlsx")
FRM_O2A <- readxl::read_excel(excel_fn, 'FRM_O2A')
FRM_O2P <- readxl::read_excel(excel_fn, 'FRM_O2P')
data.table::setDT(FRM_O2A)
data.table::setDT(FRM_O2P)
toadd_sauerst <- getData4sauerst(FRM_O2A, FRM_O2P)
toadd_sauerst

## End(Not run)

maciejrosolowski/progressdatenbankderivate documentation built on Nov. 29, 2024, 3:39 a.m.