Documente Academic
Documente Profesional
Documente Cultură
html
Numeric Versions
Description
A simple S3 class for representing numeric versions including package versions, and associated
methods.
Usage
Arguments
x
a character vector with suitable numeric version strings (see Details); for
package_version, alternatively an R version object as obtained by R.version.
strict
a logical indicating whether invalid numeric versions should results in an error (default)
or not.
Details
Numeric versions are sequences of one or more non-negative integers, usually (e.g., in package
DESCRIPTION files) represented as character strings with the elements of the sequence
concatenated and separated by single . or - characters. R package versions consist of at least two
such integers, an R system version of exactly three (major, minor and patchlevel).
The [[ operator extracts or replaces a single version. To access the integers of a version use two
indices: see the examples.
See Also
compareVersion; packageVersion for the version of a specific R package. R.version etc for the
version of R (and the information underlying getRversion()).
Examples
1 of 2 08/Sep/2017, 7:57 PM
R: Numeric Versions http://127.0.0.1:16480/library/base/html/numeric_version.html
c(min(x), max(x))
x[2, 2]
x$major
x$minor
2 of 2 08/Sep/2017, 7:57 PM