Learn R Programming

PheVis (version 1.0.4)

matrix_exp_smooth: matrix_exp_smooth

Description

Function to accumulate the information with exponential decay.

Usage

matrix_exp_smooth(half_life, df, date, patient_id, encounter_id)

Value

A data.frame object with both the raw variables and the accumulated ones.

Arguments

half_life

Duration of accumulation. For a chronic disease you might chose Inf, for acute disease you might chose the duration of the disease.

df

Dataframe of the explanatory variables.

date

Vector of date. The date should be in a numeric format.

patient_id

The vector of patient id

encounter_id

The vector of visit id