How to disable Rstudio loading via namespace feature/bug when R script opened?

Hi,

I was unable to find any mention of this anywhere: when using Rstudio within a project or not, if one or several R/Rmd scripts are open, Rstudio loads packages via namespace if they are used in the opened scripts.

Is it a feature? If so, is there a way to disable it and only allow to explicitly load/attach packages?

EDIT: I am using RStudio Server Version 1.3.959 and R 4.0.0, installed on Debian GNU/Linux 10 (buster) (within a Docker container).

Thanks for any help/information about this.
Mickaël

2 Likes

Maybe related to the startup settings Tools | Global Options ... | General ?

In my totally different RStudio Version 1.4.410 for Windows 10 I see

1 Like

Thanks, but this behaviour seems to be related to RStudio scanning R/Rmd files and then loading packages via their namespace, i.e., you don't have access to them in the R console.
As you can see below, nothing is saved, nor restored.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.