versionInfo: RStudio Version Information

Description Usage Value Note Examples

Description

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.

Usage

1

Value

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

Note

The versionInfo function was added in version 0.97.124 of RStudio.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
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


## End(Not run)

rstudio/rstudioapi documentation built on June 7, 2019, 3:43 p.m.