get_last_run: return the first value in values_from from the last string of...

View source: R/revision_analysis.R

get_last_runR Documentation

return the first value in values_from from the last string of trues in bool_vec

Description

the point of this operation is to get the value in values_from which occurs at the same index as the start of the last run of true values in bool_vec. for example, in c(1,1,0,1,1), we want the 4th entry, since there's a 0 breaking the run

Usage

get_last_run(bool_vec, values_from)

cmu-delphi/epiprocess documentation built on Oct. 29, 2024, 5:37 p.m.