Questions tagged [renv]
47 questions
4
votes
1 answer
Can renv be used to create a virtual environment with a specific version of R?
I recently installed R 4.0, after previously using relying R 3.6.3. To manage R repositories, I use Rstudio (currently 1.2.5042 on a Windows 10 machine). After upgrading to R 4.0, I opened a project from a few months ago, and realized that Rstudio…
![](../../users/profiles/6714089.webp)
Matt
- 168
- 6
3
votes
2 answers
Rscript to use renv environment
How do I execute a command using RScript myfile.R so that it uses the renv environment of the project/directory it's in, NOT my default environment?
![](../../users/profiles/3424793.webp)
dvanic
- 357
- 1
- 3
- 14
3
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…
![](../../users/profiles/10294459.webp)
Freakazoid
- 420
- 2
- 8
3
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…
![](../../users/profiles/4128686.webp)
Pete900
- 1,714
- 1
- 16
- 33
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…
![](../../users/profiles/1198249.webp)
solarchemist
- 348
- 1
- 10
2
votes
1 answer
How to use renv package in shiny app to avoid installing new packages on shiny server?
I wanted to test renv package for shiny app.
here is my dummy app :
library(pool)
library(fresh)
library(shiny)
ui <- fluidPage(
titlePanel("Old Faithful Geyser Data"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
…
![](../../users/profiles/9112767.webp)
user9112767
- 1,319
- 9
- 23
2
votes
0 answers
How to manage dependencies for an R project manually?
I'm aware of, and have been looking at, renv. The issue is that when using renv with renv::init() it will scrape through the repo for any .R files and add them to the renv.lock, which is a (often large) json file.
If I want to add a package manually…
![](../../users/profiles/3130747.webp)
baxx
- 1,902
- 15
- 34
2
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…
![](../../users/profiles/6046409.webp)
7Leven
- 35
- 1
- 6
2
votes
2 answers
How to completely remove renv from an R statistics program
I have been using renv on a R project, but now want to remove it from renv versioning, i.e. delete all renv associated files, but still have access to the libraries that I used installed under renv. How do I do this? Alternatively, how do I migrate…
![](../../users/profiles/1299362.webp)
Obromios
- 11,158
- 11
- 58
- 98
2
votes
1 answer
How to maintain R (renv) project
My colleagues and I are working on a book with Bookdown in RStudio. Since I create a lot of graphics with ggplot and therefore I have many dependencies to other packages (ggplot, ggforce, gganimate, ...), I added renv in the course of the book to…
![](../../users/profiles/8987238.webp)
ralph
- 33
- 6
1
vote
0 answers
Installing sf package in R under renv on Macos
I'm having problems in installing the sf package through renv. I have installed R from source in my Mac and everything is fine. I was able to install rgdal and sf through install.packages but can't make it with renv. The problem is that the…
![](../../users/profiles/3987294.webp)
nicola
- 21,926
- 2
- 28
- 48
1
vote
1 answer
renv::restore() error: failed to retrieve 'package' (using private package)
I am intending to use the renv package in R to set up a global cache on a linux server, where other users would be able to: i) use the packages by creating symlinks to the renv library I created (and therefore save on memory and time by not…
![](../../users/profiles/11783513.webp)
M M
- 364
- 2
- 10
1
vote
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…
![](../../users/profiles/2725773.webp)
deschen
- 2,415
- 2
- 13
- 25
1
vote
2 answers
Why are objects masked after running library(renv) in R?
I'm following this steps, like in this workflow here:
renv::init()
working as usual and installing new packages
renv::snapshot()
The problem I'm facing is while running library(renv), many functions are been masked, like load, so I have to re-mask…
![](../../users/profiles/8816308.webp)
lo labs
- 67
- 12
1
vote
1 answer
How can I install a package to a directory that includes an apostrophe using makeLazyLoading?
In RStudio, I have set up a new project using renv. I am trying to install the RMarkdown package and its dependencies. However, the pathname for my project includes an apostrophe and spaces which is preventing me from installing certain packages. I…
![](../../users/profiles/13007156.webp)
Tom
- 107
- 8