File: versionInfo.Rd

package info (click to toggle)
r-cran-rstudioapi 0.17.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 916 kB
  • sloc: makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stubs.R
\name{versionInfo}
\alias{versionInfo}
\title{RStudio version information}
\usage{
versionInfo()
}
\value{
An \R list with the following elements:

\tabular{ll}{
\code{version} \tab The version of RStudio. \cr
\code{mode} \tab \code{"desktop"} for RStudio Desktop, or \code{"server"} for RStudio Server. \cr
\code{citation} \tab Information on how RStudio can be cited in academic publications. \cr
}
}
\description{
Query information about the currently running instance of RStudio.
}
\note{
The \code{versionInfo} function was added in version 0.97.124 of
RStudio.
}
\examples{

\dontrun{
info <- rstudioapi::versionInfo()

# check what version of RStudio is in use
if (info$version >= "1.4") {
  # code specific to versions of RStudio 1.4 and newer
}

# check whether RStudio Desktop or RStudio Server is being used
if (info$mode == "desktop") {
  # code specific to RStudio Desktop
}

# Get the citation
info$citation

}

}