first_which_not_na {tidytidbits}R Documentation

First which() is not na

Description

First which() is not na

Usage

first_which_not_na(...)

Arguments

...

Values; concatenated as given. Intended use is with one vector of length > 1 or multiple single arguments.

Value

The index of the first value which is not NA, or NA iff all elements are NA.

Examples

# 4
first_which_not_na(NA, NA, NA, 56)

[Package tidytidbits version 0.3.2 Index]