rstudioapi (version 0.4.0)

versionInfo:

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

versionInfo()

Arguments

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

Examples

Run this code
## 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
# 
## ---------------------------------------------

Run the code above in your browser using DataCamp Workspace