Learn R Programming

tidytidbits (version 0.3.2)

first_which_not_na: 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

Run this code
# NOT RUN {
# 4
first_which_not_na(NA, NA, NA, 56)
# }

Run the code above in your browser using DataLab