% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is.na.piar_index.R
\name{is.na.piar_index}
\alias{is.na.piar_index}
\alias{anyNA.piar_index}
\title{Missing values in a price index}
\usage{
\method{is.na}{piar_index}(x)

\method{anyNA}{piar_index}(x, recursive = FALSE)
}
\arguments{
\item{x}{\verb{[piar_index]} A price index, as made by,
e.g., \code{\link[=elementary_index]{elementary_index()}}.}

\item{recursive}{\verb{[logical(1)]} Check if \code{x} also has missing percent-change
contributions. By default only index values are checked for missingness.}
}
\value{
\code{is.na()} returns a logical matrix, with a row for each level of \code{x} and a
columns for each time period, that indicates which index values are missing.

\code{anyNA()} returns \code{TRUE} if any index values are missing, or percent-change
contributions (if \code{recursive = TRUE}).
}
\description{
Identify missing values in a price index.
}
\examples{
index <- as_index(matrix(c(1, 2, 3, NA, 5, NA), 2))

anyNA(index)
is.na(index)

# Carry forward imputation.
index[is.na(index)] <- 1
index
}
\seealso{
Other index methods:
\code{\link[=[.piar_index]{[.piar_index()}},
\code{\link{aggregate.piar_index}},
\code{\link[=as.data.frame.piar_index]{as.data.frame.piar_index()}},
\code{\link[=as.ts.piar_index]{as.ts.piar_index()}},
\code{\link[=chain]{chain()}},
\code{\link[=contrib]{contrib()}},
\code{\link[=head.piar_index]{head.piar_index()}},
\code{\link[=levels.piar_index]{levels.piar_index()}},
\code{\link{mean.piar_index}},
\code{\link[=merge.piar_index]{merge.piar_index()}},
\code{\link[=split.piar_index]{split.piar_index()}},
\code{\link[=stack.piar_index]{stack.piar_index()}},
\code{\link[=time.piar_index]{time.piar_index()}},
\code{\link[=window.piar_index]{window.piar_index()}}
}
\concept{index methods}
