Check if a specific version of a package is installed, and throw an error if not what was anticipated. Particularly useful when submitting jobs to cluster compute nodes where package versions may be been updated inadvertently.
Examples
if (FALSE) { # \dontrun{
CheckPackages('dplyr == 1.2.1') # fails if not exact version
CheckPackages('dplyr <= 1.2.1') # fails if not equal to or less than
CheckPackages('dplyr >= 1.2.1') # allows specific version or higher
CheckPackages('dplyr <= 1.2.1', 'mirt >= 1.45.1') # multiple checks
} # }