give the max value up to that point
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 maximum
value up to that point
Examples
max_through(c(4, 3, 3, 2, 5, 1))
#> [1] 4 4 4 4 5 5
max_through(c(NA, 2, 1, 4, 2))
#> [1] NA 2 2 4 4