powered by
Compares current R version with a given target version, which may be useful for implementing version dependent code.
testRversion(x, test = 1L)
a logical
target version to compare with.
numeric value that indicates the comparison to be carried out. The comparison is based on the result from utils::compareVersion(R.version, x):
utils::compareVersion(R.version, x)
1: is R.version > x?
x
0: is R.version = x?
-1: is R.version < x?
testRversion("2.14") testRversion("2.15") testRversion("10") testRversion("10", test = -1) testRversion("< 10") testRversion(Rversion()) testRversion(paste0('=', Rversion()))
Run the code above in your browser using DataLab