smartCOP: Compute the smartCOP score.

View source: R/smartCOP.R

smartCOPR Documentation

Compute the smartCOP score.

Description

Compute the smartCOP score.

Usage

smartCOP(
  FRM_RR,
  FRM_BEF,
  FRM_VIS,
  FRM_DIL_LABORWERTE,
  FRM_B24,
  DID_PROBAND,
  DID_CLIN,
  DID_OXYGENIND_SINGLE,
  FRM_O2A,
  zp_fabian = "auf_in_d-1_in_d0"
)

Arguments

FRM_RR

data.table containing the table with the same name from the database of the PROGRESS study

FRM_BEF

data.table containing the table with the same name from the database of the PROGRESS study

FRM_VIS

data.table containing the table with the same name from the database of the PROGRESS study

FRM_DIL_LABORWERTE

data.table containing the table with the same name from the database of the PROGRESS study

FRM_B24

data.table containing the table with the same name from the database of the PROGRESS study

DID_PROBAND

data.table containing the table with the same name from the database of the PROGRESS study

DID_CLIN

data.table containing the table with the same name from the database of the PROGRESS study

DID_OXYGENIND_SINGLE

data.table containing the table with the same name from the database of the PROGRESS study

FRM_O2A

data.table containing the table with the same name from the database of the PROGRESS study

zp_fabian

vector of characters. They must be present in event2zeitpunkt_table$zp_fabianref. Currently, only zp_fabian = "auf_in_d-1_in_d0" is possible.

Value

a named list with components: input and out. input is a data.table in the wide format (one row per patient), containing the data used for computing the smartCOP score. out is a data.table with one row corresponding to one patient, identified by the PATSTUID. The column smartCOP contains the value of smartCOP score. The score is avaiable, if more than 50 are available.

Examples

## Not run: 
excel_fn <- paste0("/net/ifs1/san_projekte/projekte/",
"PROGRESS/Datenmanagement/Data_freezes/",
"20190320/PROGRESS-freeze_201903_01.xlsx")
FRM_RR <- readxl::read_excel(excel_fn, 'FRM_RR')
FRM_BEF <- readxl::read_excel(excel_fn, 'FRM_BEF')
FRM_VIS <- readxl::read_excel(excel_fn, 'FRM_VIS')
FRM_DIL_LABORWERTE <- readxl::read_excel(excel_fn, 'FRM_DIL_LABORWERTE')
FRM_B24 <- readxl::read_excel(excel_fn, 'FRM_B24')
DID_PROBAND <- readxl::read_excel(excel_fn, 'DID_PROBAND')
DID_CLIN <- readxl::read_excel(excel_fn, 'DID_CLIN')
DID_OXYGENIND_SINGLE <- readxl::read_excel(excel_fn, 'DID_OXYGENIND_SINGLE')
FRM_O2A <- readxl::read_excel(excel_fn, 'FRM_O2A')
data.table::setDT(FRM_RR)
data.table::setDT(FRM_BEF)
data.table::setDT(FRM_VIS)
data.table::setDT(FRM_DIL_LABORWERTE)
data.table::setDT(FRM_B24)
data.table::setDT(DID_PROBAND)
data.table::setDT(DID_CLIN)
data.table::setDT(DID_OXYGENIND_SINGLE)
data.table::setDT(FRM_O2A)
erg <- smartCOP(FRM_RR, FRM_BEF, FRM_VIS, FRM_DIL_LABORWERTE, FRM_B24,
DID_PROBAND, DID_CLIN, DID_OXYGENIND_SINGLE, FRM_O2A,
zp_fabian = "auf_in_d-1_in_d0")
erg

## End(Not run)

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