Learn R Programming

gtools (version 3.9.5)

checkRVersion: Check if a newer version of R is available

Description

Check if a newer version of R is available

Usage

checkRVersion(quiet = FALSE)

Value

Either the version number of the latest version of R, if the running version is less than the latest version, or NULL.

Arguments

quiet

Logical indicating whether printed output should be suppressed.

Author

Gregory R. Warnes

Details

This function accesses the R web site to discover the latest released version of R. It then compares this version to the running version. If the running version is the same as the latest version, it prints the message, "The latest version of R is installed:" followed by the version number, and returns NULL. If the running version is older than the current version, it displays the message, "A newer version of R is now available:" followed by the corresponding version number, and returns the version number.

If quiet=TRUE, no printing is performed.

See Also

Examples

Run this code

try(
   ver <- checkRVersion()
)
print(ver)

Run the code above in your browser using DataLab