![]() Normally R wouldn’t pick up these settings. These environment variables are placed in a user’s bash profile by a system admin. In server environments, there are often environment variables set every time a user interacts with the server. Recall our rule of thumb: “When else do I want this variable to be set?” You might ask why you’d ever want more options. In short, RStudio Server Pro provides more ways to customize the environment used by R. In addition, RStudio Server Pro launches R from bash, which means settings defined in the user’s bash profile are available. Prior to starting R, RStudio Server Pro uses PAM to create a session, and sources the rsession-profile. RStudio Server Pro acts differently from R and the open-source version of RStudio. Spoiler: it’s a bit different than you might expect! Automatically run code at the end of a session to capture and log sesssionInfo(). ![]() Define a proxy so R can reach the internet in locked-down environments.Use a different version of Python, e.g., to support a Tensorflow project.Tell R about a local CRAN-like repository to host and share R packages internally.This post will elaborate on the official documentation and provide some examples. R’s behavior is thoroughly documented in R’s base documentation: “Initialization at Start of an R Session”. But, for system administrators, package developers, and R enthusiasts, customizing the launch process can provide a powerful tool and help avoid common gotchas. In fact, for portability and reproducibility of code, we recommend that users do not modify R’s startup profile. Most R users will never have to worry about changing R’s startup process. R sets environment variables, loads base packages, and understands whether you’re running a script, an interactive session, or even a build command. R’s startup behavior is incredibly powerful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |