I currently have an R project that I created in Rstudio. For this project I created an .Rprofile file. Lately, I've been using JupyterLab to test things, and while I set the same working directory ( setwd("~/path/to/project")
) as the same as the project I created in RStudio, the R session in JupyterLab doesn't read the project's .Rprofile.
How can share a project's .Rprofile and .Renviron files between RStudio and JupyterLab?
You can load the files manually, eg in your first Jupyter cell:
source("/path/to/.Rprofile")
readRenviron("/path/to/.Renviron")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.