% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/packages.R
\name{compareNA}
\alias{compareNA}
\title{\code{NA}-aware comparison of two vectors}
\usage{
compareNA(v1, v2)
}
\arguments{
\item{v1}{A vector}

\item{v2}{A vector}
}
\value{
A logical vector, indicating positions where two vectors are same or differ.
}
\description{
Copied from
\url{http://www.cookbook-r.com/Manipulating_data/Comparing_vectors_or_factors_with_NA/}.
This function returns \code{TRUE} wherever elements are the same, including \code{NA}'s,
and \code{FALSE} everywhere else.
}
\examples{
a <- c(NA, 1, 2, NA)
b <- c(1, NA, 2, NA)
compareNA(a, b)

}
