Many thanks, I should have looked at rstudioapi, from rstudioapi::isAvailable():
> .Platform$GUI [1] "RStudio" Georgi From: jorism...@gmail.com [mailto:jorism...@gmail.com] On Behalf Of Joris Meys Sent: 09 February 2018 09:09 To: Georgi Boshnakov Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] discovering if a function in a package is called under RStudio 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.boshna...@manchester.ac.uk<mailto:georgi.boshna...@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@r-project.org<mailto:R-package-devel@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]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel