new_spell: new_spell

Description Usage Arguments Value

Description

new_spell

Usage

1
2
new_spell(df, id = "PseudoID", adt = "CSPAdmissionTime", npat = "new.pat",
  epno = "EpisodeNumber")

Arguments

df

an episode dataframe

id

the column name of the id field

adt

the column name of the admission datetime field

npat

the column name of the new patient flag field

epno

the episode number in the spell

Value

a dataframe which is a copy of df with a new column new_spell which is TRUE if the row represents an episode that is the first for that patient and that admission datetime, and FALSE if the row above represents an episode for the same patient and same admission datetime.


HorridTom/clahrcnwlhf documentation built on May 7, 2019, 4:02 a.m.