versionInfo.Rd
Provides information about the currently running version of RStudio, including it's specific version number and whether it is running in desktop or server mode.
versionInfo()
The versionInfo
function was added in version 0.97.124 of RStudio.
Returns a list with the following elements:
version | A package version object that can be used in comparisons. This is the same value which would be returned from packageVersion("rstudio") |
mode | Current program mode (either "desktop" or "server") |
citation | An object inheriting from class bibentry |
if (FALSE) { require(rstudioapi) ver <- versionInfo() # Test specific version constraint if (ver$version >= "0.97") { # do some 0.97 dependent stuff } # Check current mode desktopMode <- ver$mode == "desktop" serverMode <- ver$mode == "server" # Get the citation ver$citation }