Learn R Programming

pkgmaker (version 0.10.1)

testRversion: Testing R Version

Description

Compares current R version with a given target version, which may be useful for implementing version dependent code.

Usage

testRversion(x, test = 1L)

Arguments

x
target version to compare with.
test
numeric value that indicates the comparison to be carried out. The comparison is based on the result from utils::compareVersion(R.version, x):
  • 1: is R.version >x?
  • 0: is R.version =x?
  • -

Value

  • a logical

Examples

Run this code
testRversion("2.14")
testRversion("2.15")
testRversion("2.30")
testRversion("2.30", -1)
testRversion("2")
testRversion(Rversion())

Run the code above in your browser using DataLab