checkVers {reposTools}R Documentation

A function to compare versions w/ operation string

Description

Handles comparisons of VersionNumber objects when the operator is in string form (e.g. ">=", "==", etc).

Usage

checkVers(x, op, y)

Arguments

x The left side object
op The operator to use for comparison, in string format
y The right object to compare

Details

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.

Value

TRUE or FALSE as appropriate

Author(s)

Jeff Gentry

Examples

   a <- buildVersionNumber("1.2.3")
   b <- buildVersionNumber("2.0")
   checkVers(a,"<=",b)    ## will see if a <= b
   checkVers(a,"==",b)
   checkVers(a,">",b)

[Package reposTools version 1.8.0 Index]