% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/isYear.R
\name{isYear}
\alias{isYear}
\title{isYear}
\usage{
isYear(x, with_y = TRUE)
}
\arguments{
\item{x}{A vector}

\item{with_y}{indicates which dataformat years have to have (4-digit without
y (e.g.1984) or 5digit including y (y1984))}
}
\value{
Returns a vector of the length of x with TRUE and FALSE
}
\description{
Function to find out whether a vector consists of strings in the format
"yXXXX" or "XXXX" with X being a number
}
\examples{

x <- c("1955", "y1853", "12a4")
isYear(x, with_y = TRUE)
isYear(x, with_y = FALSE)
}
\seealso{
Other ObjectInfo: 
\code{\link{dimExists}()},
\code{\link{fulldim}()},
\code{\link{hasCoords}()},
\code{\link{hasSets}()},
\code{\link{is.temporal}()},
\code{\link{ncells}()},
\code{\link{ndim}()},
\code{\link{sameDims}()}
}
\author{
Benjamin Bodirsky
}
\concept{ObjectInfo}
