vscode-R
vscode-R copied to clipboard
R terminal doesn't execute `~/.Rprofile` if renv is enabled and `RENV_CONFIG_USER_PROFILE=TRUE` is set in `~/.Renviron`
Describe the bug
R doesn't execute ~/.Rprofile
if renv is enabled and RENV_CONFIG_USER_PROFILE=TRUE
is set in ~/.Renviron
.
Background: renv is not supposed to source ~/.Rprofile
by default, but this can be changed via RENV_CONFIG_USER_PROFILE
environment variable.
To Reproduce Steps to reproduce the behavior:
- Create an empty project with
renv::init()
- Set
RENV_CONFIG_USER_PROFILE=TRUE
in~/.Renviron
. - Add some diagnostics code to
~/.Rprofile
. E.g.,cat("hello\n")
. - Open code session in the project directory.
- Open an R terminal for that project.
Can you fix this issue by yourself? (We appreciate the help)
No
Expected behavior
hello
when a new R terminal is started
However, if you start R from terminal in the same directory you see hello
.
- OS: macOS and linux
- VSCode Version: 1.82.1
- R Version: 4.3.0
- vscode-R version: 2.8.1