Questions tagged [renv]

129 questions
4
votes
1 answer

Error: "project "path/to/file.rda" has no activated script and so cannot be activated" with renv

I am trying to use renv with my project pipeline in R. My folder structure is . |-- data | |-- file1.rda | |-- file2.rda | |-- folder1 | |-- folder2 `-- repository |-- rep1 | |-- script1.R | |-- script2.R | |--…
Giulio Centorame
  • 678
  • 4
  • 19
4
votes
2 answers

RStudio install packages from Azure DevOps

I'm creating some internal packages with R in RStudio. My repositories are hosted in Azure DevOps. I saw the renv.lock and there is a section for repositories. { "R": { "Version": "3.6.1", "Repositories": [ { "Name": "CRAN", …
Enrico
  • 3,592
  • 6
  • 45
  • 102
4
votes
2 answers

Why does `renv` do not restore packages which are deprecated for a older R versions?

I have the following setup: I initialized a new R-Project (R 3.4.3) from a git repo. The project from the repo used renv(0.11.0) to snapshot the project packages The renv.lock file contains multiple packages. One of them is raster with version…
Freakazoid
  • 490
  • 3
  • 10
4
votes
1 answer

What is RENV_PATHS_CACHE_HOST? -- docker documentation

In the docker vignette/documentation, they give an example with a shiny app, but don't exactly specify what their parameters mean. Some of them are self explanatory, but others aren't. More…
7Leven
  • 65
  • 1
  • 8
4
votes
2 answers

Use renv for private GitLab package

I have a local GitLab account with an R package that can be installed by: devtools::install_git( url = "http://my-gitlab/my-projects/package", credentials = git2r::cred_user_pass("user", "pass") ) When I run renv::init() the package source is…
Pete900
  • 2,016
  • 1
  • 21
  • 44
3
votes
1 answer

How do I disable the "What do you want to do?" message shown by renv?

I'm a long-time renv fan and user but on upgrading to renv 1.0.0 I'm now tearing my hair out. Every time I open a new project and run a script, after the first library command renv gives me a message: What do you want to do? 1: Snapshot, just using…
3
votes
1 answer

How can I install devtools with Renv without getting an Error

Renv, can't install devtools Goal: install devtools with renv Expected Results: Installation of devtools. Actual Results: see error below I try to install packages in RStudio through renv (On Ubuntu), to use for my own package. I performed Renv…
G.Smits
  • 31
  • 4
3
votes
1 answer

renv + venv + jupyterlab + IRkernel: will it blend?

Short version What is the simple and elegant way to use renv, venv and jupyterlab with IRkernel together? In particular, how to automatically activate renv from jupyter notebook that is not in the root directory? Long version I'm embracing a…
psarka
  • 1,562
  • 1
  • 13
  • 25
3
votes
1 answer

Error: package or namespace load failed for ‘rjags’

I have a M1 Macbook Pro running OS Big Sur and just tried to install rjags and JAGS. I downloaded JAGS from https://sourceforge.net/projects/mcmc-jags/ without a problem, and ran install_packages("rjags"), but when I run library(rjags) I get this…
AFH
  • 665
  • 1
  • 9
  • 28
3
votes
1 answer

R renv package creates subfolder "staging" - can these be deleted without danger?

I'm using the renv package for keeping my R projects identical across computers. I saw that within my R project folder there is a subfolder renv/staging. This folder again contains several subfolders named from 1 to XX (in my case 38). Some of these…
deschen
  • 10,012
  • 3
  • 27
  • 50
3
votes
1 answer

How can I stop rmarkdown::render() from Rmd files inside project's renv library?

I have a Hugo blog which is compiled using the default blogdown::build_site() route. I decided to give renv:: a try, because some of my posts are both plot-heavy and prone to depend on old package versions, so why not make sure future complete site…
solarchemist
  • 438
  • 3
  • 13
2
votes
2 answers

R session freezes with renv 0.17.2

I opened a new project in Rstudio $version [1] ‘2023.3.0.386’ (R version 4.2.3) and initiated renv. The initiation runs normally, however, after finishing the R session freezes. When I restart RStudio the R session freezes again. The console will…
ava
  • 840
  • 5
  • 19
2
votes
0 answers

Use packages from old R-Version in new R-Version with renv

I'm using renv i.e. for package management in R-projects. I cannot load packages from external sources. After a new R-Version was installed, I want to continue using the same packages in the new version as used in the old R-version. Since renv…
Peter
  • 2,120
  • 2
  • 19
  • 33
2
votes
0 answers

Renv with docker. How to use local renv cache for packages in docker?

I am trying to build docker image for a R project. I created environment with renv for this project to lock state of packages that I used during this project. How can I build docker image for this project and use the renv cache of my local machine…
DONMEA
  • 21
  • 2
2
votes
1 answer

What does renv::activate() do?

I read here in the documentation that renv::activate() adds source("renv/init.R") to the project .Rprofile. However, my .Rprofile has source("renv/activate.R") in there instead, as created by RStudio. Isn't this an error in de documentation? It does…
Ralph
  • 123
  • 4
1
2
3
8 9