How to activate renv in notebook #4687
-
Hi all! My apologies if this is answered elsewhere or if I'm just missing something obvious (I'm a bit of a newcomer to R as well, coming from python). I was testing out using Jupyter notebooks in positron and I was wondering if it is possible to use the local renv for packages. Renvs work great in R scripts without me having to do anything, but in a notebook context it doesn't find my renv-installed packages (where my notebook is under the
My question is - is there a better way to do this? Messing around with paths can get clunky, especially if I need to move things around. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @rbudnar, thanks for raising this. I think is expected right now because we set the working directory for the notebook to the folder it is in, so in your case We could, perhaps, try to detect this situation in projects and special case notebook sessions with env information. |
Beta Was this translation helpful? Give feedback.
Hi @rbudnar, thanks for raising this. I think is expected right now because we set the working directory for the notebook to the folder it is in, so in your case
/src
. If your renv is in the root folder above that, it would not see it.We could, perhaps, try to detect this situation in projects and special case notebook sessions with env information.