View source: R/time_after_flag.R
time_after_criteria | R Documentation |
time_after_criteria calculates the time after some filter critera within a group
time_after_criteria(.df, .name, ..., groups = "ID", .time = "TIME",
.name_fn = NULL, units = "hours", digits = 2)
.df |
dataframe |
.name |
output column name |
... |
filter criteria |
groups |
grouping variables |
.name_fn |
custom function for naming with formatting |
units |
units time scale should be in, defaults to hours. Possible values include: secs, mins, hours, days, weeks |
digits |
digits to round, defaults to 2 |
.col |
column |
this is a very flexible function that can be used to do almost any time_from_x calculcation. For example, to given a conmed column with admininstration flagged as "Y", time from conmed could be calculated simply with df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.