Skip to contents

Keep values at the start of .x while .p is true

Usage

keep_while(.x, .p)

Arguments

.x

Vector

.p

Logical vector

Value

A vector the same type as .x with only leading elements where .p is TRUE.