get_baseline: Function to get the baseline lab value

View source: R/get_baseline_function.R

get_baselineR Documentation

Function to get the baseline lab value

Description

Function to get the baseline lab value

baseline function for bilirubin and creatinine

baseline function for GFR and Platelets

Usage

get_baseline(.data, labvalue, patientid, result_day, onset_type, blood)

## S3 method for class 'bili'
get_baseline(.data, labvalue, patientid, result_day, onset_type, blood)

## S3 method for class 'plate'
get_baseline(.data, labvalue, patientid, result_day, onset_type, blood)

Arguments

.data

Your dataset

labvalue

Your lab value, can be bilirubin, creatinine, GFR, or platelets

patientid

A column denoting a unique patient identifier

result_day

A Date column denoting when a lab resulted

onset_type

A character value denoting if an encounter is community or hospital onset

blood

A POSIXct indicating the blood culture time

Value

Returns a dataset with a new column for the baseline of the specified lab value

Examples

## Not run: 
data <- get_baseline(creat, result_day = lab_results, .blood = blood_data)

## End(Not run)

trentgillin/SepsisR documentation built on Nov. 26, 2022, 12:41 p.m.