Description Usage Arguments Value
lag.column
1 2 |
df |
a dataframe |
c1 |
name of a column of df |
nm |
new column name |
backlag |
direction of lagging |
sc |
a screening column |
a copy of df with a new column in the dataframe that is equal to c1 but shifted either down (backlag = FALSE) or up (backlag = TRUE). Furthermore, if a "screening" column sc is specified, then: For backlag = FALSE, rows that are just above a TRUE in sc are not shifted down - the row with the TRUE in has an NA in the new column (think new patient rows when defining end of last episode) For backlag = TRUE, rows that have a TRUE in sc are not shifted up - the row above the TRUE has an NA in the new column (think new patient rows when defining start of next episode)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.