hutilscpp (version 0.1.0)

which_true_onwards: At which point are all values true onwards

Description

At which point are all values true onwards

Usage

which_true_onwards(x)

Arguments

x

A logical vector. NA values are not permitted.

Value

The position of the first TRUE value in x at which all the following values are TRUE.

Examples

Run this code
# NOT RUN {
which_true_onwards(c(TRUE, FALSE, TRUE, TRUE, TRUE))

# }

Run the code above in your browser using DataLab