time_after_criteria: time_after_criteria calculates the time after some filter...

View source: R/time_after_flag.R

time_after_criteriaR Documentation

time_after_criteria calculates the time after some filter critera within a group

Description

time_after_criteria calculates the time after some filter critera within a group

Usage

time_after_criteria(.df, .name, ..., groups = "ID", .time = "TIME",
  .name_fn = NULL, units = "hours", digits = 2)

Arguments

.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

Details

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


qPharmetra/PMDatR documentation built on April 7, 2024, 5:42 p.m.