give the min value up to that point

min_through(x)

Arguments

x

A numeric vector of values

Details

useful for safety analyses where an event may be defined as a certain change in a biomarker, so need to see how the current measurement compares to the minimum value up to that point

Examples

min_through(c(4, 3, 3, 2, 4, 1))
#> [1] 4 3 3 2 2 1
min_through(c(NA, 2))
#> [1] NA 2