File: testRversion.Rd

package info (click to toggle)
r-cran-pkgmaker 0.32.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,192 kB
  • sloc: sh: 13; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{testRversion}
\alias{testRversion}
\title{Testing R Version}
\usage{
testRversion(x, test = 1L)
}
\arguments{
\item{x}{target version to compare with.}

\item{test}{numeric value that indicates the comparison to be carried out.
The comparison is based on the result from
\code{utils::compareVersion(R.version, x)}:
\itemize{
\item 1: is R.version > \code{x}?
\item 0: is R.version = \code{x}?
\item -1: is R.version < \code{x}?
}}
}
\value{
a logical
}
\description{
Compares current R version with a given target version, which may be useful
for implementing version dependent code.
}
\examples{

testRversion("2.14")
testRversion("2.15")
testRversion("10")
testRversion("10", test = -1)
testRversion("< 10")
testRversion(Rversion())
testRversion(paste0('=', Rversion()))

}