checkVers {reposTools} | R Documentation |
Handles comparisons of VersionNumber objects when the operator is in string form (e.g. ">=", "==", etc).
checkVers(x, op, y)
x |
The left side object |
op |
The operator to use for comparison, in string format |
y |
The right object to compare |
Will handle the situation 'x op y' for any op that is a valid comparitor in the VersionNumber class. The string 'op' is converted into the proper comparitor and then applied to the values x and y.
TRUE or FALSE as appropriate
Jeff Gentry
a <- buildVersionNumber("1.2.3") b <- buildVersionNumber("2.0") checkVers(a,"<=",b) ## will see if a <= b checkVers(a,"==",b) checkVers(a,">",b)