% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integerutil.R
\name{firstNA}
\alias{firstNA}
\title{Position of first NA}
\usage{
firstNA(x)
}
\arguments{
\item{x}{an R vector}
}
\value{
a reversed vector
}
\description{
This is substantially faster than \code{which.max(is.na(x))}
}
\examples{
x <- c(FALSE,NA,TRUE)
firstNA(x)
reverse_vector(x)
\dontrun{
x <- 1:1e7
system.time(rev(x))
system.time(reverse_vector(x))
}
}
\seealso{
\code{\link{which.max}}, \code{\link{is.na}}, \code{\link{anyNA}}, \code{\link{anyDuplicated}}, \code{\link{bit_anyDuplicated}}
}
