[R-pkg-devel] discovering if a function in a package is called under RStudio

Georgi Boshnakov georgi.boshnakov at manchester.ac.uk
Fri Feb 9 10:22:59 CET 2018

Many thanks, I should have looked at rstudioapi, from rstudioapi::isAvailable():

> .Platform$GUI
[1] "RStudio"


From: jorismeys at gmail.com [mailto:jorismeys at gmail.com] On Behalf Of Joris Meys
Sent: 09 February 2018 09:09
To: Georgi Boshnakov
Cc: r-package-devel at r-project.org
Subject: Re: [R-pkg-devel] discovering if a function in a package is called under RStudio

you can use rstudioapi::isAvailable() for that. There's other packages with similar functionality (eg the assertive package), and you can always check whether Sys.getenv("RSTUDIO") == "1".

On Fri, Feb 9, 2018 at 9:09 AM, Georgi Boshnakov <georgi.boshnakov at manchester.ac.uk<mailto:georgi.boshnakov at manchester.ac.uk>> wrote:

Is there a canonical way for a function to discover if it has been called in a session under RStudio?
I looked the at the options() but none seems to be dedicated to this.

Georgi Boshnakov

R-package-devel at r-project.org<mailto:R-package-devel at r-project.org> mailing list

Joris Meys
Statistical consultant

Department of Data Analysis and Mathematical Modelling
Ghent University
Coupure Links 653, B-9000 Gent (Belgium)

tel: +32 (0)9 264 61 79
Biowiskundedagen 2017-2018

Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list