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()

Note

The versionInfo function was added in version 0.97.124 of RStudio.

Value

Returns a list with the following elements:

versionA package version object that can be used in comparisons. This is the same value which would be returned from packageVersion("rstudio")
modeCurrent program mode (either "desktop" or "server")
citationAn object inheriting from class bibentry

Examples

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 }