\HeaderA{package-version}{Package versions}{package.Rdash.version}
\aliasA{\$.package\_version}{package-version}{.Rdol..package.Rul.version}
\aliasA{.decode\_package\_version}{package-version}{.decode.Rul.package.Rul.version}
\aliasA{.encode\_package\_version}{package-version}{.encode.Rul.package.Rul.version}
\aliasA{as.character.package\_version}{package-version}{as.character.package.Rul.version}
\aliasA{as.data.frame.package\_version}{package-version}{as.data.frame.package.Rul.version}
\aliasA{as.package\_version}{package-version}{as.package.Rul.version}
\aliasA{c.package\_version}{package-version}{c.package.Rul.version}
\aliasA{getRversion}{package-version}{getRversion}
\aliasA{is.package\_version}{package-version}{is.package.Rul.version}
\aliasA{Ops.package\_version}{package-version}{Ops.package.Rul.version}
\aliasA{package\_version}{package-version}{package.Rul.version}
\aliasA{print.package\_version}{package-version}{print.package.Rul.version}
\aliasA{Summary.package\_version}{package-version}{Summary.package.Rul.version}
\aliasA{[.package\_version}{package-version}{[.package.Rul.version}
\aliasA{[[.package\_version}{package-version}{[[.package.Rul.version}
\keyword{utilities}{package-version}
\begin{Description}\relax
A simple S3 class for representing package versions, and
associated methods.
\end{Description}
\begin{Usage}
\begin{verbatim}
package_version(x, strict = TRUE)

getRversion()
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a character vector with package version strings, or an R
version object as obtained by \code{\LinkA{R.version}{R.version}}.
\item[\code{strict}] a logical indicating whether invalid package versions
should results in an error (default) or not.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\R{} (package) versions are sequences of at least two non-negative
integers, usually (e.g., in package \file{DESCRIPTION} files)
represented as character strings with the elements of the sequence
concatenated and separated by single \samp{.} or \samp{-} characters.

\code{package\_version} creates a representation from such strings
which allows for coercion and testing, combination, comparison,
summaries (min/max), inclusion in data frames, subscripting, and
printing.

\code{getRversion} returns the version of the running \R{} as an object
of class \code{"package\_version"}.
\end{Details}
\begin{SeeAlso}\relax
\code{\LinkA{compareVersion}{compareVersion}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- package_version(c("1.2-4", "1.2-3", "2.1"))
x < "1.4-2.3"
c(min(x), max(x))
x[2, 2]
x$major
x$minor
\end{ExampleCode}
\end{Examples}

