1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/integerutil.R
3\name{firstNA}
4\alias{firstNA}
5\title{Position of first NA}
6\usage{
7firstNA(x)
8}
9\arguments{
10\item{x}{an R vector}
11}
12\value{
13a reversed vector
14}
15\description{
16This is substantially faster than \code{which.max(is.na(x))}
17}
18\examples{
19x <- c(FALSE,NA,TRUE)
20firstNA(x)
21reverse_vector(x)
22\dontrun{
23x <- 1:1e7
24system.time(rev(x))
25system.time(reverse_vector(x))
26}
27}
28\seealso{
29\code{\link{which.max}}, \code{\link{is.na}}, \code{\link{anyNA}}, \code{\link{anyDuplicated}}, \code{\link{bit_anyDuplicated}}
30}
31