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

Joris Meys Joris.Meys at ugent.be
Fri Feb 9 10:09:02 CET 2018


Hi,

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".
Cheers
Joris


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

> Hi,
>
> 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.
>
> Thanks,
> Georgi Boshnakov
>
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



-- 
Joris Meys
Statistical consultant

Department of Data Analysis and Mathematical Modelling
Ghent University
Coupure Links 653, B-9000 Gent (Belgium)
<https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g>

tel: +32 (0)9 264 61 79
-----------
Biowiskundedagen 2017-2018
http://www.biowiskundedagen.ugent.be/

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

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list