diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 84e6bd7ca..995dc4c47 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -13,7 +13,7 @@ articles: python: python.html renv: renv.html rsconnect: rsconnect.html -last_built: 2024-08-16T03:16Z +last_built: 2024-08-16T03:23Z urls: reference: https://rstudio.github.io/renv/reference article: https://rstudio.github.io/renv/articles diff --git a/dev/reference/checkout.html b/dev/reference/checkout.html index db8c25247..fb2a1eea2 100644 --- a/dev/reference/checkout.html +++ b/dev/reference/checkout.html @@ -1,6 +1,6 @@ -Checkout a repository — checkout • renvCheckout a repository — checkout • renv Skip to content @@ -55,7 +55,7 @@
-

renv::checkout() can be used to retrieve the latest-availabe packages from +

renv::checkout() can be used to retrieve the latest-available packages from a (set of) package repositories.

@@ -111,7 +111,7 @@

Argumentsc("snapshot", "restore") if you'd like to generate a lockfile and -install those packages in the same step.

+install those packages in a single call.

project
@@ -145,7 +145,7 @@

Examplesrenv::checkout(date = "2023-01-02") # alternatively, supply the full repository path -renv::checkout(repos = "https://packagemanager.rstudio.com/cran/2023-01-02") +renv::checkout(repos = c(PPM = "https://packagemanager.rstudio.com/cran/2023-01-02")) # only check out some subset of packages (and their recursive dependencies) renv::checkout(packages = "dplyr", date = "2023-01-02") diff --git a/dev/search.json b/dev/search.json index 8c760e1a2..e148e41f9 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://rstudio.github.io/renv/dev/articles/ci.html","id":"github-actions","dir":"Articles","previous_headings":"","what":"GitHub actions","title":"Using renv with continuous integration","text":", describe two common approaches integrating renv GitHub Actions workflow: Use r-lib/setup-renv action. Use GitHub’s built-cache action together existing renv functionality;","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/ci.html","id":"using-r-libactionssetup-renv","dir":"Articles","previous_headings":"GitHub actions","what":"Using r-lib/actions/setup-renv","title":"Using renv with continuous integration","text":"r-lib organization offers actions R users, among setup-renv action provided projects using renv. use action, can add following steps workflow: Using steps automatically perform following actions: renv installed, via install.packages(\"renv\"), renv configured use GitHub cache, provided via : profile: key, renv profile activated, project restored via renv::restore(). , steps using R use active renv project default.","code":"steps: - uses: actions/checkout@v3 - uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-renv@v2"},{"path":"https://rstudio.github.io/renv/dev/articles/ci.html","id":"using-the-github-actions-cache-with-renv","dir":"Articles","previous_headings":"GitHub actions","what":"Using the GitHub Actions Cache with renv","title":"Using renv with continuous integration","text":"using renv custom GitHub action workflow, two main requirements: Cache packages installed renv across runs, Use renv::restore() restore packages using cache speed installation example, steps might look like: See also example GitHub actions.","code":"env: RENV_PATHS_ROOT: ~/.cache/R/renv steps: - name: Cache packages uses: actions/cache@v1 with: path: ${{ env.RENV_PATHS_ROOT }} key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} restore-keys: | ${{ runner.os }}-renv- - name: Restore packages shell: Rscript {0} run: | if (!requireNamespace(\"renv\", quietly = TRUE)) install.packages(\"renv\") renv::restore()"},{"path":"https://rstudio.github.io/renv/dev/articles/ci.html","id":"gitlab-ci","dir":"Articles","previous_headings":"","what":"GitLab CI","title":"Using renv with continuous integration","text":"following template can used base using renv GitLab CI:","code":"variables: RENV_PATHS_CACHE: ${CI_PROJECT_DIR}/renv/cache cache: key: ${CI_JOB_NAME} paths: - ${RENV_PATHS_CACHE} before_script: - < ... other pre-deploy steps ... > - Rscript -e \"if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')\" - Rscript -e \"renv::restore()\""},{"path":"https://rstudio.github.io/renv/dev/articles/docker.html","id":"creating-docker-images-with-renv","dir":"Articles","previous_headings":"","what":"Creating Docker images with renv","title":"Using renv with Docker","text":"Docker, Dockerfiles used define new images. Dockerfiles can used declaratively specify Docker image created. Docker image captures state machine point time – e.g., Linux operating system downloading installing R 4.4. Docker containers can created using image base, allowing different independent applications run using pre-defined machine state. First, ’ll need get renv installed Docker image. easiest way accomplish remotes package. example, install latest release renv CRAN: Alternatively, needed use development version renv, use: Next, ’d like renv.lock lockfile used install R packages Docker image built, ’ll need copy container: Next, need tell renv library paths use package installation. can either set RENV_PATHS_LIBRARY environment variable writable path within Docker container, copy renv auto-loader tools container project-local library can automatically provisioned used R launched. Finally, can run renv::restore() restore packages defined lockfile: , renv download install requisite packages appropriate image created. new containers created image hence R packages installed visible run-time.","code":"RUN R -e \"install.packages('renv', repos = c(CRAN = 'https://cloud.r-project.org'))\" RUN R -e \"install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))\" RUN R -e \"remotes::install_github('rstudio/renv')\" WORKDIR /project COPY renv.lock renv.lock # approach one ENV RENV_PATHS_LIBRARY renv/library # approach two RUN mkdir -p renv COPY .Rprofile .Rprofile COPY renv/activate.R renv/activate.R COPY renv/settings.json renv/settings.json RUN R -e \"renv::restore()\""},{"path":"https://rstudio.github.io/renv/dev/articles/docker.html","id":"speeding-up-package-installations","dir":"Articles","previous_headings":"","what":"Speeding up package installations","title":"Using renv with Docker","text":"aforementioned approach useful multiple applications identical package requirements. case, single image containing identical package library serve parent image several containerized applications. However, renv::restore() slow – needs download install packages, can take time. Thus, care required efficiently make use renv cache projects require: Building image multiple times (e.g., debug production application source code updated), Calling renv::restore() time container run. former process can sped using multi-stage builds, latter dynamically provisioning R Libraries, described .","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/docker.html","id":"multi-stage-builds","dir":"Articles","previous_headings":"Speeding up package installations","what":"Multi-stage builds","title":"Using renv with Docker","text":"projects require repeatedly building image, multi-stage builds can used speed build process. multi-stage builds, multiple statements used Dockerfile files can copied across build stages. approach can leveraged generate efficient builds dedicating first stage build package synchronization second stage build copying files executing code may need updated often across builds (e.g., code needs debugged container). implement two stage build, following code used part Dockerfile. code uses name first stage build base. , replaced appropriate image name. Subsequently, code uses approach 2 (described ) copy auto-loader project directory image. additionally creates renv/.cache directory used renv cache. second stage build defined adding following code Dockerfile, previous code chunk. , parent image base, (see documentation details). key line COPY command, specifies contents /project directory base image copied /project directory image. commands change frequently across builds included COPY command. code associated second stage build updated renv::restore() called build time. Instead, layers associated base image loaded Docker’s cache, thereby saving significant time build process. fact, renv::restore() called base image needs rebuilt (e.g., changes made renv.lock). Docker’s cache system generally good understanding dependencies images. However, find base image updating expected, possible manually enforce clean build including ---cache option call docker build.","code":"# STAGE 1: renv-related code FROM AS base WORKDIR /project # using approach 2 above RUN mkdir -p renv COPY renv.lock renv.lock COPY .Rprofile .Rprofile COPY renv/activate.R renv/activate.R COPY renv/settings.dcf renv/settings.dcf # change default location of cache to project folder RUN mkdir renv/.cache ENV RENV_PATHS_CACHE renv/.cache # restore RUN R -e \"renv::restore()\" FROM WORKDIR /project COPY --from=base /project . # add commands that need to be debugged below"},{"path":"https://rstudio.github.io/renv/dev/articles/docker.html","id":"dynamically-provisioning-r-libraries-with-renv","dir":"Articles","previous_headings":"Speeding up package installations","what":"Dynamically Provisioning R Libraries with renv","title":"Using renv with Docker","text":"However, occasion, one multiple applications built single base image, application independent R package requirements. case, rather including package dependencies image , preferable container provision library run-time, based application’s renv.lock lockfile. effect, simple ensuring renv::restore() happens container run-time, rather image build time. However, , renv::restore() slow – needs download install packages, take prohibitively long application needs run repeatedly. renv package cache can used help ameliorate issue. cache enabled, whenever renv attempts install restore R package, first checks see whether package already available within renv cache. , instance package linked project library. Otherwise, package first installed renv cache, newly-installed copy linked use project. effect, renv cache available, need pay cost package installation – , newly-installed package available re-use across different projects. time, project’s library remain independent isolated one another, installing package within one container won’t affect another container. However, default, Docker container independent filesystem. Ideally, ’d like containers launched particular image access renv cache. accomplish , ’ll tell container use renv cache located shared mount. sum, ’d like allow run-time provisioning R package dependencies, need ensure renv cache located shared volume, visible containers launched. accomplish : Setting RENV_PATHS_CACHE environment variable, tell instance renv running container global cache lives; Telling Docker mount filesystem location host filesystem, location (RENV_PATHS_CACHE_HOST), container-specific location (RENV_PATHS_CACHE_CONTAINER). example, container running Shiny application: , calls renv APIs within created docker container access mounted cache. first time run container, renv likely need populate cache, time spent downloading installing required packages. Subsequent runs much faster, renv able reuse global package cache. primary downside approach compared image-based approach requires modify containers created, requires bit extra orchestration containers launched. However, renv cache active, newly-created containers launch quickly, single image can used base myriad different containers applications, independent package dependencies.","code":"# the location of the renv cache on the host machine RENV_PATHS_CACHE_HOST=/opt/local/renv/cache # where the cache should be mounted in the container RENV_PATHS_CACHE_CONTAINER=/renv/cache # run the container with the host cache mounted in the container docker run --rm \\ -e \"RENV_PATHS_CACHE=${RENV_PATHS_CACHE_CONTAINER}\" \\ -v \"${RENV_PATHS_CACHE_HOST}:${RENV_PATHS_CACHE_CONTAINER}\" \\ -p 14618:14618 \\ R -s -e 'renv::restore(); shiny::runApp(host = \"0.0.0.0\", port = 14618)'"},{"path":"https://rstudio.github.io/renv/dev/articles/docker.html","id":"handling-the-renv-autoloader","dir":"Articles","previous_headings":"","what":"Handling the renv autoloader","title":"Using renv with Docker","text":"R launched within project folder, renv auto-loader (present) attempt download install renv project library. Depending Docker container configured, fail. example: Bootstrapping renv project library might unnecessary . case, can avoid behavior launching R --vanilla flag set; example:","code":"Error installing renv: ====================== ERROR: unable to create '/usr/local/pipe/renv/library/master/R-4.0/x86_64-pc-linux-gnu/renv' Warning messages: 1: In system2(r, args, stdout = TRUE, stderr = TRUE) : running command ''/usr/lib/R/bin/R' --vanilla CMD INSTALL -l 'renv/library/master/R-4.0/x86_64-pc-linux-gnu' '/tmp/RtmpwM7ooh/renv_0.12.2.tar.gz' 2>&1' had status 1 2: Failed to find an renv installation: the project will not be loaded. Use `renv::activate()` to re-initialize the project. R --vanilla -s -e 'renv::restore()'"},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"why-isnt-my-package-being-snapshotted-into-the-lockfile","dir":"Articles","previous_headings":"","what":"Why isn’t my package being snapshotted into the lockfile?","title":"Frequently asked questions","text":"package recorded lockfile, must : Installed project library, Used project, determined renv::dependencies(). ensures packages truly require project enter lockfile; development dependencies (e.g. devtools) normally . find package entering lockfile, check output renv::dependencies(). expected package listed, ’s likely dependencies() uses static analysis understand different ways package might used project. See docs details.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"capturing-all-dependencies","dir":"Articles","previous_headings":"Why isn’t my package being snapshotted into the lockfile?","what":"Capturing all dependencies","title":"Frequently asked questions","text":"’d instead prefer capture packages installed project library (eschew dependency discovery altogether), can : Packages can also explicitly ignored project setting, e.g. : might also want double-check set ignored packages (renv::settings$ignored.packages()) confirm aren’t unintentionally ignoring package actually require. See documentation ?snapshot details.","code":"renv::settings$snapshot.type(\"all\") renv::settings$ignored.packages(\"\")"},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"capturing-explicit-dependencies","dir":"Articles","previous_headings":"Why isn’t my package being snapshotted into the lockfile?","what":"Capturing explicit dependencies","title":"Frequently asked questions","text":"’d like explicitly declare packages project depends , can telling renv form “explicit” snapshots: mode, renv include packages explicitly listed project’s DESCRIPTION file dependencies.","code":"renv::settings$snapshot.type(\"explicit\")"},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"how-do-i-update-the-lockfile","dir":"Articles","previous_headings":"","what":"How do I update the lockfile?","title":"Frequently asked questions","text":"important thing remember renv::snapshot() captures state project point time renv::snapshot() called. sense, “right” way update lockfile : Load renv project, Make changes want; e.g. install packages; call options(repos = <...>); … Call renv::snapshot() update lockfile. said, also free modify renv.lock lockfile hand necessary; e.g. want manually add / change repositories, change version package used, . renv.lock lockfile JSON file. JSON schema provided renv repository. main downside editing package record lockfile directly won’t able provide Hash package, renv won’t able use global package cache installing package.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"how-should-i-handle-development-dependencies","dir":"Articles","previous_headings":"","what":"How should I handle development dependencies?","title":"Frequently asked questions","text":"related question: design, renv.lock normally captures build-time deploy-time dependencies; may capture packages use iterative workflows (e.g. devtools). However, may want way still ensuring development dependencies get installed trying restore project library. cases like , recommend tracking packages project DESCRIPTION file; typically, within Suggests: field. , can execute: request renv install packages described DESCRIPTION file. addition, Remotes: fields parsed used, ensure packages installed declared remote source appropriate.","code":"renv::install()"},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"im-returning-to-an-older-renv-project--what-do-i-do","dir":"Articles","previous_headings":"","what":"I’m returning to an older renv project. What do I do?","title":"Frequently asked questions","text":"Suppose using renv manage older project’s dependencies. older lockfile, capturing dependencies use last working project. now need resume work project – ? answer depends exactly want use project. want treat “time capsule”, dependencies frozen time? dependencies project fluid, primarily using renv just isolation project dependencies? time capsules, use renv::restore() reinstall exact packages declared project lockfile renv.lock. may also need find install older version R used previously project, unless intention upgrade R. projects fluid dependencies, call renv::update() get latest versions dependencies. ’ve verified code still works (made changes needed get working), call renv::snapshot() record latest versions. can also take managed approach, ’s somewhat two extremes: Use renv::restore() restore project state defined lockfile. Install update packages deliberately renv::install() friends. Verify code works, call renv::snapshot() update new lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/faq.html","id":"why-are-package-downloads-failing","dir":"Articles","previous_headings":"","what":"Why are package downloads failing?","title":"Frequently asked questions","text":"issues ultimately boil lack connectivity machine R package repositories remote sources trying use. working corporate environment, may worth confirming whether corporate proxy place inhibiting internet access, whether R renv need configured way compatible working environment. often true Windows machines enterprise environments, default “wininet” download method may work reliably others. Learn vignette(\"package-install\"). addition, note renv places shims R search path re-routes calls install.packages() renv::install(). need bypass shims, can use utils::install.packages(<...>); , call install.packages() explicitly qualified package utils::. See ?renv::load details.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"cache","dir":"Articles","previous_headings":"","what":"Cache","title":"Installing packages","text":"One renv’s primary features global package cache, shared across projects. renv package cache provides two primary benefits: Installing restoring packages much faster, renv can find re-use previously installed packages cache. Projects take less disk space, project doesn’t need contain ’s copy every package. installing package, renv installs global cache adds symlink1 directory project library. way renv project remains isolated projects system, can still re-use installed packages. process packages enter cache roughly follows: Package installation requested via e.g. install.packages(), renv::install(), part renv::restore(). renv able find requested version package cache, package linked project library, installation complete. Otherwise, package downloaded installed project library. installation package successfully completed, package copied global package cache, symlinked project library. cases, renv unable directly link global package cache project library, e.g. package cache project library live different disk volumes. case, renv instead copy package cache project library. much slower, worth avoiding.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"cache-location","dir":"Articles","previous_headings":"Cache","what":"Cache location","title":"Installing packages","text":"can find location current cache renv::paths$cache(). default, one following folders: Linux: ~/.cache/R/renv/cache macOS: ~/Library/Caches/org.R-project.R/R/renv/cache Windows: %LOCALAPPDATA%/renv/cache ’d like share package cache across multiple users, can setting RENV_PATHS_CACHE environment variable shared path. variable set R startup file make apply R sessions. can set project-local .Renviron, user-level ~/.Renviron, generally recommend using R installation’s site-wide Renviron.site ’d like ensure cache path visible users R system. may also want set RENV_PATHS_CACHE global package cache can stored volume projects normally work . especially important working projects stored networked filesystem.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"multiple-caches","dir":"Articles","previous_headings":"Cache","what":"Multiple caches","title":"Installing packages","text":"also possible configure renv use multiple cache locations. example, might want make user-local package cache, well global administrator-managed cache, visible within renv project. , can specify paths cache separated ; (: Unix preferred). example: case, renv iterate cache locations order trying find package, newly-installed packages enter first writable cache path listed RENV_PATHS_CACHE.","code":"RENV_PATHS_CACHE=/path/to/local/cache;/path/to/global/cache"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"shared-cache-locations","dir":"Articles","previous_headings":"Cache","what":"Shared cache locations","title":"Installing packages","text":"renv cache enabled, cache shared visible multiple users, users opportunity install packages renv cache. However, care must taken ensure packages can used different users environment: Packages copied cache may Access-control Lists (ACLs), might prevent others using packages installed cache. case, ’s important ACLs set (updated) cache entries cache accessible user requiring access. deploying renv enterprise environment, system administrator take care ensure ACLs () allow users access packages within renv cache. default, packages copied cache remain “owned” user requested installation package. ’d like renv instead re-assign ownership cached package separate user account, can set RENV_CACHE_USER environment variable. set, renv attempt run chown -R update cache ownership package copied cache.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"caveats","dir":"Articles","previous_headings":"Cache","what":"Caveats","title":"Installing packages","text":"recommend enabling cache default, ’re trouble , can disable setting project setting renv::settings$use.cache(FALSE). ensure packages installed project library directly, without attempting link use packages renv cache. find problematic package entered cache (example, installed package become corrupted), package can removed renv::purge() function. See ?purge documentation caveats things aware removing packages cache. can also force package re-installed re-cached following functions: See function’s respective documentation details.","code":"# restore packages from the lockfile, bypassing the cache renv::restore(rebuild = TRUE) # re-install a package renv::install(\"\", rebuild = TRUE) # rebuild all packages in the project renv::rebuild()"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"building-from-source","dir":"Articles","previous_headings":"","what":"Building from source","title":"Installing packages","text":"possible, renv install package binaries, sometimes binary available build source. Installation source can challenging reasons: system need compatible compiler toolchain available. cases, R packages may depend C / C++ features aren’t available older system toolchain, especially older Linux enterprise environments. system need requisite system libraries, many R packages contain compiled C / C++ code depend link packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"configure-flags","dir":"Articles","previous_headings":"Building from source","what":"Configure flags","title":"Installing packages","text":"Many R packages configure script needs run prepare package installation. Arguments environment variables can passed scripts manner similar install.packages(). particular, R options configure.args configure.vars can used map package names appropriate configuration. example: also specified , example,","code":"# installation of RNetCDF may require us to set include paths for netcdf configure.args = c(RNetCDF = \"--with-netcdf-include=/usr/include/udunits2\")) options(configure.args = configure.args) renv::install(\"RNetCDF\") options( configure.args.RNetCDF = \"--with-netcdf-include=/usr/include/udunits2\" ) renv::install(\"RNetCDF\")"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"install-flags","dir":"Articles","previous_headings":"Building from source","what":"Install flags","title":"Installing packages","text":"Similarly, additional flags passed R CMD INSTALL can set via install.opts R option:","code":"# installation of R packages using the Windows Subsystem for Linux # may require the `--no-lock` flag to be set during install options(install.opts = \"--no-lock\") renv::install(\"xml2\") # alternatively, you can set such options for specific packages with e.g. options(install.opts = list(xml2 = \"--no-lock\")) renv::install(\"xml2\")"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"vignettes","dir":"Articles","previous_headings":"Building from source","what":"Vignettes","title":"Installing packages","text":"renv build vignettes installing package source. vignettes often require suggested packages, installing suggested packages (particularly source) can arduous. want distribute vignettes packages, suggest creating repository binaries, either R Universe (publicly hosted packages GitHub), Posit Package Manager, drat.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"downloads","dir":"Articles","previous_headings":"","what":"Downloads","title":"Installing packages","text":"default, renv uses curl file downloads available. allows renv support number download features across multiple versions R, including: Custom headers (used especially authentication), Connection timeouts, Download retries transient errors. curl available machine, highly recommended install . Newer versions Windows 10 come bundled version curl.exe; users Windows can use renv::equip() download install recent copy curl. Newer versions macOS come bundled version curl adequate usage renv, Linux package managers modern version curl available package repositories. can also configure curl executable used setting RENV_CURL_EXECUTABLE environment variable, necessary. curl downloads can configured renv’s configuration settings – see ?renv::config details.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"alternative-downloaders","dir":"Articles","previous_headings":"Downloads","what":"Alternative downloaders","title":"Installing packages","text":"’ve already configured R’s downloader like bypass renv’s attempts use curl, can use R option renv.download.override. example, executing: instruct renv use R’s download machinery attempting download files internet (respecting R options download.file.method download.file.extra appropriate). Advanced users can also provide download function, provided signature matches utils::download.file(). can also instruct renv use different download method setting RENV_DOWNLOAD_METHOD environment variable. example: find downloads work outside renv projects, within renv projects, may need tell renv use download file method R configured use. can check download method R currently configured use : downloader currently used renv can queried : can force renv use download method R setting: , necessary, also set environment variable within e.g. ~/.Renviron, visible R sessions. See ?Startup details. Note features (e.g. authentication) may supported using alternative download file method – configure downloader required. See ?download.file details.","code":"options(renv.download.override = utils::download.file) # use Windows' internal download machinery Sys.setenv(RENV_DOWNLOAD_METHOD = \"wininet\") # use R's bundled libcurl implementation Sys.setenv(RENV_DOWNLOAD_METHOD = \"libcurl\") getOption(\"download.file.method\") renv:::renv_download_method() Sys.setenv(RENV_DOWNLOAD_METHOD = getOption(\"download.file.method\"))"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"proxies","dir":"Articles","previous_headings":"Downloads","what":"Proxies","title":"Installing packages","text":"downloads need go proxy server, variety approaches can take make work: Set http_proxy / https_proxy environment variables. environment variables can contain full URL proxy server, including username + password necessary. can use .curlrc (_curlrc Windows) provide information proxy server used. file placed home folder (see Sys.getenv(\"HOME\"), Sys.getenv(\"R_USER\") Windows); alternatively, can set CURL_HOME environment variable point custom ‘home’ folder used curl resolving runtime configuration file. Windows, can also place _curlrc directory curl.exe binary located. See curl documentation proxies config files details. example, following _curlrc works using authentication NTLM SSPI Windows: curl R package also helper: may useful attempting discover proxy address.","code":"--proxy \"your.proxy.dns:port\" --proxy-ntlm --proxy-user \":\" --insecure curl::ie_get_proxy_for_url()"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"authentication","dir":"Articles","previous_headings":"Downloads","what":"Authentication","title":"Installing packages","text":"project may make use packages available remote sources requiring form authentication access – example, GitHub enterprise server. Usually, either personal access token (PAT) username + password combination required authentication. renv able authenticate downloading sources, using system remotes package. particular, environment variables used record transfer required authentication information. credentials can stored e.g. .Renviron, can set R session means appropriate. require custom authentication different packages (example, project makes use packages available different GitHub enterprise servers), can use renv.auth R option provide package-specific authentication settings. renv.auth can either named list associating package names environment variables, function accepting package name + record, returning list environment variables. example: packages installed Git remotes, renv attempt use git command line download restore associated package. Hence, recommended authentication done SSH keys possible. Authentication may required resolving package remote specification. package name inferred directly remote, can supplied prefix form =. example, igraph package GitHub https://github.com/igraph/rigraph installed :","code":"# define a function providing authentication options(renv.auth = function(package, record) { if (package == \"MyPackage\") return(list(GITHUB_PAT = \"\")) }) # use a named list directly options(renv.auth = list( MyPackage = list(GITHUB_PAT = \"\") )) # alternatively, set package-specific option # as a list options(renv.auth.MyPackage = list(GITHUB_PAT = \"\")) # as a function options(renv.auth.MyPackage = function(record) { list(GITHUB_PAT = \"\") }) renv::install(\"igraph=igraph/rigraph\")"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"azure-devops","dir":"Articles","previous_headings":"Downloads > Authentication","what":"Azure DevOps","title":"Installing packages","text":"Authentication Azure DevOps may require credentials set slightly different way. particular, can use: replacing appropriate – example, password may just PAT. See https://github.com/rstudio/renv/issues/1751 details.","code":"GITHUB_USER = GITHUB_PASS = "},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"git-and-personal-access-tokens","dir":"Articles","previous_headings":"Downloads > Authentication","what":"Git and Personal Access Tokens","title":"Installing packages","text":"Rather username + password, remote Git repositories might require Personal Access Tokens (PATs) authentication. Typically, servers expect authentication credentials : PAT supplied username, Either empty response, string x-oauth-basic, provided password. help facilitate , can set: appropriate startup R file.","code":"GIT_USER = GIT_PASS = x-oauth-basic"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"custom-headers","dir":"Articles","previous_headings":"Downloads","what":"Custom headers","title":"Installing packages","text":"want set arbitrary headers downloading files using renv, can using renv.download.headers R option. function accepts URL, returns named character vector indicating headers supplied accessing URL. example, suppose package repository hosted https:///repository, credentials required access repository stored AUTH_HEADER environment variable. define renv.download.headers like : , renv set Authorization header whenever attempts download files repository URL https:///repository.","code":"options(renv.download.headers = function(url) { if (grepl(\"^https://my/repository\", url)) return(c(Authorization = Sys.getenv(\"AUTH_HEADER\"))) })"},{"path":"https://rstudio.github.io/renv/dev/articles/package-install.html","id":"debugging","dir":"Articles","previous_headings":"Downloads","what":"Debugging","title":"Installing packages","text":"problems downloads, can get debugging information (including raw requests responses) setting:","code":"options(renv.download.trace = TRUE)"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"package-sources","dir":"Articles","previous_headings":"","what":"Package sources","title":"Package sources","text":"renv uses installed package’s DESCRIPTION file infer source. example, packages installed CRAN repositories typically field: set, renv takes signal package retrieved CRAN.","code":"Repository: CRAN"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"inferring-package-sources","dir":"Articles","previous_headings":"Package sources","what":"Inferring package sources","title":"Package sources","text":"following fields checked, order, inferring package’s source: RemoteType field; typically written packages installed devtools, remotes pak packages, Repository field; example, packages retrieved CRAN typically Repository: CRAN field, biocViews field; typically present packages installed Bioconductor repositories, fallback, renv unable determine package’s source DESCRIPTION file directly, package name available active R repositories (specified getOption(\"repos\")), package treated though installed R package repository. methods fail, renv finally check package available cellar. package cellar typically used escape hatch, packages well-defined remote source, packages might remotely accessible machine.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"unknown-sources","dir":"Articles","previous_headings":"Package sources","what":"Unknown sources","title":"Package sources","text":"renv unable infer package’s source, inform renv::snapshot() – example, attempted snapshot package called skeleton known source: can still create lockfile packages, restore() likely fail unless can ensure package installed mechanism.","code":"> renv::snapshot() The following package(s) were installed from an unknown source: skeleton renv may be unable to restore these packages in the future. Consider reinstalling these packages from a known source (e.g. CRAN). Do you want to proceed? [y/N]:"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"custom-r-package-repositories","dir":"Articles","previous_headings":"Package sources","what":"Custom R package repositories","title":"Package sources","text":"Custom local R package repositories supported well. requirement repositories set part repos R option, repositories named. example, might use: tell renv work official CRAN package repository, well package repository hosted set work environment.","code":"repos <- c(CRAN = \"https://cloud.r-project.org\", WORK = \"https://work.example.org\") options(repos = repos)"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"bioconductor","dir":"Articles","previous_headings":"Package sources","what":"Bioconductor","title":"Package sources","text":"renv designed work together seamlessly possible Bioconductor project. vignette outlines extra steps may required using renv packages obtained Bioconductor.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"initializing-a-project","dir":"Articles","previous_headings":"Package sources","what":"Initializing a project","title":"Package sources","text":"initialize renv project using Bioconductor, can pass bioconductor argument renv::init(): tell renv activate appropriate Bioconductor repositories, use repositories attempting restore packages.","code":"# use the latest-available Bioconductor release renv::init(bioconductor = TRUE) # use a specific version of Bioconductor renv::init(bioconductor = \"3.14\")"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"bioconductor-releases","dir":"Articles","previous_headings":"Package sources > Initializing a project","what":"Bioconductor releases","title":"Package sources","text":"Bioconductor prepares different versions package repositories, use different versions R. version Bioconductor used within particular renv project stored project setting, also within project lockfile. allows “lock” particular project particular Bioconductor release, even new Bioconductor releases made available newer versions R. set version Bioconductor used project, can use: later choose upgrade R, may need upgrade version Bioconductor used well. want override Bioconductor repositories used renv, can also explicitly set following option:","code":"renv::settings$bioconductor.version(\"3.14\") options(renv.bioconductor.repos = c(...))"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"the-package-cellar","dir":"Articles","previous_headings":"Package sources","what":"The package cellar","title":"Package sources","text":"cases, project may depend R packages available external source, external source may accessible machine calling renv::restore(). help accommodate scenarios, renv allows prepare package “cellar”, used ad-hoc repository packages restore. allows provide package tarballs can used restore packages retrieved source. environment variable RENV_PATHS_CELLAR can used customize package cellar location. point directory containing package binaries sources, structure form: ${RENV_PATHS_CELLAR}/_.tar.gz; ${RENV_PATHS_CELLAR}//_.tar.gz Alternatively, can also use project-local cellar placing packages within folder located /renv/cellar. Note folder exist default; must create opt-. /renv/cellar/_.tar.gz; /renv/cellar//_.tar.gz example, project depended package skeleton 1.0.0, place tarball package one following locations: ${RENV_PATHS_CELLAR}/skeleton_1.0.0.tar.gz ${RENV_PATHS_CELLAR}/skeleton/skeleton_1.0.0.tar.gz /renv/cellar/skeleton_1.0.0.tar.gz; /renv/cellar/skeleton/skeleton_1.0.0.tar.gz done, renv consult directories future attempts restore packages. can install package cellar like package, .e. renv::install(\"skeleton\"). restore, compatible package located within cellar, copy package preferred even package might otherwise accessible associated remote source. example, skeleton 1.0.0 also available CRAN, renv::restore() still use tarball available cellar rather version available CRAN. want see paths renv using cellar, can use: See ?paths details.","code":"renv:::renv_paths_cellar()"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"explicit-sources","dir":"Articles","previous_headings":"Package sources > The package cellar","what":"Explicit sources","title":"Package sources","text":"can also provide explicit source paths lockfile desired. useful building renv lockfile “hand”, need tweak existing lockfile point separate package installation. example, package record renv.lock form: Packages following extensions, depending whether archive contains binary copy package package sources: Note Linux, binaries sources .tar.gz extension, R renv handle appropriate installation.","code":"{ \"Package\": \"skeleton\", \"Version\": \"1.0.1\", \"Source\": \"/mnt/r/pkg/skeleton_1.0.1.tar.gz\" }"},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"abi-compatibility","dir":"Articles","previous_headings":"Package sources","what":"ABI compatibility","title":"Package sources","text":"ABI compatibility issues can arise different packages built different versions shared dependency. example, one package may built Rcpp 1.0.6, another package might built Rcpp 1.0.7. However, one version Rcpp package can loaded time within R session, mixing two packages might cause issues either load runtime depending version Rcpp available. ’s worth emphasizing Rcpp’s fault; package built Rcpp 1.0.7 reasonably expect newer APIs made available version package available runtime, contract violated older version Rcpp installed project library. challenge renv build-time dependency clearly communicated renv; general, possible know packages (versions) particular package built .","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/package-sources.html","id":"build-time-dependencies","dir":"Articles","previous_headings":"Package sources","what":"Build-time dependencies","title":"Package sources","text":"R packages might occasionally (unintentionally) take build-time dependency another R package – example, package code: take version %>% available version magrittr available build time, one available run time. problematic , example, update magrittr package changed way made old definitions %>% incompatible newer internal functions. general, mistake packages take build-time dependency exported objects another package; rather, objects imported runtime (using e.g. importFrom() package NAMESPACE file).","code":"`%>%` <- magrittr::`%>%`"},{"path":"https://rstudio.github.io/renv/dev/articles/packages.html","id":"development","dir":"Articles","previous_headings":"","what":"Development","title":"Package development","text":"Often, R packages R packages dependencies. , one must declare R package dependencies within package DESCRIPTION file. want prepare environment package development, can use: install packages declared package’s DESCRIPTION file. action roughly analogous remotes::install_deps(). ’re developing package intend release CRAN, likely want build test package latest versions dependencies available CRAN. , consider using: ensure package dependencies --date, appropriate.","code":"renv::install() renv::update()"},{"path":"https://rstudio.github.io/renv/dev/articles/packages.html","id":"isolation","dir":"Articles","previous_headings":"","what":"Isolation","title":"Package development","text":"Normally, package development tested latest-available versions dependencies CRAN. However, cases, may need ensure package compatible packages also currently development. cases, renv project library can useful – can install development version(s) dependencies project library, without worrying clobbering packages already installed system library. cases, can declare development dependencies using Remotes field DESCRIPTION file; e.g. renv::install() parse remotes declaration retrieve requested package. See remotes vignette, Dependency resolution R package development, details.","code":"Remotes: r-lib/ggplot2"},{"path":"https://rstudio.github.io/renv/dev/articles/packages.html","id":"library-paths","dir":"Articles","previous_headings":"","what":"Library Paths","title":"Package development","text":"package projects using renv, library path outside project directory used instead. example, macOS, might look like: done avoid issues R CMD build, can become slow project contains large number files – can happen project library located renv/library (typical location). Note even though library located outside project, library path generated still unique project, project still effectively isolated way renv projects normally . want customize location renv places project libraries scenario, can use RENV_PATHS_LIBRARY_ROOT environment variable. example: ’d still prefer keep project library within project directory, can set: within appropriate .Renviron start-profile – please aware caveats , performance R CMD build affected.","code":"> .libPaths() [1] \"/Users/kevin/Library/Caches/org.R-project.R/R/renv/library/example-552f6e80/R-4.3/aarch64-apple-darwin20\" [2] \"/Users/kevin/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.3/aarch64-apple-darwin20/ac5c2659\" RENV_PATHS_LIBRARY_ROOT = ~/.renv/library RENV_PATHS_LIBRARY = renv/library"},{"path":"https://rstudio.github.io/renv/dev/articles/packages.html","id":"testing","dir":"Articles","previous_headings":"","what":"Testing","title":"Package development","text":"developing package, may want use continuous integration service (Travis CI) build test package remotely. can use renv help facilitate testing – see Continuous Integration vignette information. particular, clever use renv cache can help save time might normally spent package installation. See https://github.com/rstudio/renv/blob/main/.github/workflows/R-CMD-check.yaml example renv uses package management CI tests.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/packages.html","id":"submitting-to-cran","dir":"Articles","previous_headings":"","what":"Submitting to CRAN","title":"Package development","text":"Note packages submitted CRAN designed work R packages currently available CRAN. reason, preparing package submission, ’ll need ensure source package tarball include renv infrastructure. renv makes easy automatically including package’s .Rbuildignore file. instructs R CMD build include files folders generated package tarball. , even renv used package development, ’s still easy build publish package CRAN developing packages without renv.","code":"^renv$ ^renv\\.lock$"},{"path":"https://rstudio.github.io/renv/dev/articles/profiles.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Project profiles","text":"Starting renv 0.13.0, possible activate switch different profiles associated project. profile can thought different mode project used. example: “development” profile might used developing testing project, “production” profile might used production deployments, “shiny” profile might used running Shiny application. heart, activating using particular profile implies using different set paths project library lockfile. , possible associate different packages, different dependencies, different workflows single project using renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/profiles.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Project profiles","text":"default, renv projects use “default” profile, implies library lockfile paths set typical way. activate particular profile, use: creates profile called \"dev\", sets default project, newly-launched R sessions operate using \"dev\" profile. setting re-launching R, see project library lockfile paths resolved within renv/profiles/dev folder project root. Alternatively, want activate particular profile R session without setting default new R sessions, can use: renv automatically use profile appropriate computing library lockfile paths. Similarly, command line, might enforce use particular profile renv project : set, renv default using \"dev\" profile newly-launched R sessions within renv projects. activate “default” profile used project, use:","code":"renv::activate(profile = \"dev\") Sys.setenv(RENV_PROFILE = \"dev\") export RENV_PROFILE=dev renv::activate(profile = \"default\")"},{"path":"https://rstudio.github.io/renv/dev/articles/profiles.html","id":"managing-profile-specific-dependencies","dir":"Articles","previous_headings":"","what":"Managing profile-specific dependencies","title":"Project profiles","text":"Profile-specific package dependencies can declared within project’s top-level DESCRIPTION file. example, declare shiny profile depends shiny tidyverse packages: ’d like also declare packages installed custom remote (analogous Remotes field default profile), can define remotes separate field: remotes respected calls renv::install(). packages remotes must specified separately, renv determine package name associated particular remote without explicitly resolving remote. Remote resolution normally requires web request, renv tries avoid “regular” dependency discovery. ’d prefer packages enumerated field used, can opt-using \"explicit\" snapshots, leave Imports, Depends Suggests fields blank: set, dependencies listed project DESCRIPTION file used lockfile generated. See ?renv::snapshot details.","code":"Config/renv/profiles/shiny/dependencies: shiny, tidyverse Config/renv/profiles/shiny/remotes: rstudio/shiny, tidyverse/tidyverse renv::settings$snapshot.type(\"explicit\")"},{"path":"https://rstudio.github.io/renv/dev/articles/python.html","id":"activating-python-integration","dir":"Articles","previous_headings":"","what":"Activating Python integration","title":"Using Python with renv","text":"Python integration can activated project--project basis. Use renv::use_python() tell renv create use project-local Python environment project. reticulate package installed active, renv use version Python reticulate normally generating virtual environment. Alternatively, can set RETICULATE_PYTHON environment variable instruct renv use different version Python. ’d rather tell renv use existing Python virtual environment, can passing path virtual environment instead – use renv::use_python(python = \"/path//python\") renv record use Python interpreter project. can also used pre-existing virtual environments Conda environments.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/python.html","id":"understanding-python-integration","dir":"Articles","previous_headings":"","what":"Understanding Python integration","title":"Using Python with renv","text":"Python integration active, renv attempt manage state Python virtual environment snapshot() / restore() called. , projects use renv Python can ensure Python dependencies tracked addition R package dependencies. Note future restores require renv.lock (R package dependencies) requirements.txt (Python package dependencies).","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/python.html","id":"virtual-environments","dir":"Articles","previous_headings":"Understanding Python integration","what":"Virtual environments","title":"Using Python with renv","text":"using virtual environments, following extensions provided: renv::snapshot() calls pip freeze > requirements.txt save set installed Python packages; renv::restore() calls pip install -r requirements.txt install previously-recorded set Python packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/python.html","id":"conda-environments","dir":"Articles","previous_headings":"Understanding Python integration","what":"Conda environments","title":"Using Python with renv","text":"using Conda environments, following extensions provided: renv::snapshot() calls conda env export > environment.yml save set installed Python packages; renv::restore() calls conda env [create/update] --file environment.yml install previously-recorded set Python packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"libraries-and-repositories","dir":"Articles","previous_headings":"","what":"Libraries and repositories","title":"Introduction to renv","text":"get renv works, ’ll learn fully understand two important pieces R jargon: libraries repositories. library directory containing installed packages. term confusing write (e.g.) library(dplyr), making easy think ’re loading dplyr library, dplyr package. confusion doesn’t usually matter don’t think libraries, simply installing packages system library1 ’s shared across projects. renv, ’ll start using project libraries, giving project independent collection packages. can see current libraries .libPaths() see packages available library lapply(.libPaths(), list.files). repository source packages; install.packages() gets package repository (usually somewhere Internet) puts library (directory computer). important repository CRAN; can install packages CRAN just every R session. freely available repositories include Bioconductor, Posit Public Package Manager, R Universe (turns GitHub organisations repositories). can see repositories currently set session getOption(\"repos\"); call install.packages(\"{pkgname}\"), R look pkgname repository turn.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Introduction to renv","text":"convert project use renv, call renv::init(). adds three new files directories project: project library, renv/library, library contains packages currently used project2. key magic makes renv work: instead one library containing packages used every project, renv gives separate library project. gives benefits isolation: different projects can use different versions packages, installing, updating, removing packages one project doesn’t affect project. lockfile, renv.lock, records enough metadata every package can re-installed new machine. ’ll come back lockfile shortly talk renv::snapshot() renv::restore(). project R profile, .Rprofile. file run automatically every time start R (project), renv uses configure R session use project library. ensures turn renv project, stays , deliberately turn . next important pair tools renv::snapshot() renv::restore(). snapshot() updates lockfile metadata currently-used packages project library. useful can share lockfile people computers can easily reproduce current environment running restore(), uses metadata lockfile install exactly version every package. pair functions gives benefits reproducibility portability: now tracking exactly package versions installed can recreate machines. Now ’ve got high-level lay land, ’ll show couple specific workflows discussing reproducibility challenges renv doesn’t currently help .","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"collaboration","dir":"Articles","previous_headings":"Getting started","what":"Collaboration","title":"Introduction to renv","text":"One reasons use renv make easier share code way everyone gets exactly package versions . , ’ll start calling renv::init(). ’ll need commit renv.lock, .Rprofile, renv/settings.json renv/activate.R version control, ensuring others can recreate project environment. ’re using git, particularly simple renv create .gitignore , can just commit suggested files3. Now one collaborators opens project, renv automatically bootstrap , downloading installing appropriate version renv. also ask want download install packages needs running renv::restore().","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"installing-packages","dir":"Articles","previous_headings":"Getting started","what":"Installing packages","title":"Introduction to renv","text":"time, project need packages. One philosophies renv existing package management workflows continue work, can continue use familiar tools like install.packages()4. can also use renv::install(): ’s little less typing can install packages GitHub, Bioconductor, , just CRAN. use renv multiple projects, ’ll multiple libraries, meaning ’ll often need install package multiple places. annoying download (worse, compile) package repeatedly, renv uses package cache. means ever download install package , subsequent install, renv just add link project library global cache. can learn cache vignette(\"package-install\"). installing package checking code works, call renv::snapshot() record latest package versions lockfile. ’re collaborating others, ’ll need commit changes git, let know ’ve updated lockfile call renv::restore() ’re next working project.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"updating-packages","dir":"Articles","previous_headings":"Getting started","what":"Updating packages","title":"Introduction to renv","text":"’s worth noting ’s small risk associated isolation: code never break due change another package, also never benefit bug fixes. packages active development, recommend regularly (least year) use renv::update()5 get latest versions dependencies. Similarly, ’re making major changes project haven’t worked , ’s often good idea start renv::update() making changes code. calling renv::update(), run code project verify still works (make changes needed get working). call renv::snapshot() record new versions lockfile. get stuck, can’t get project work new versions, can call renv::restore() roll back changes project library revert known good state recorded lockfile. need roll back even older version, take look renv::history() renv::revert(). renv::update() also update renv , ensuring get latest features. See renv::upgrade() ever want upgrade just renv, need install development version GitHub.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"infrastructure","dir":"Articles","previous_headings":"","what":"Infrastructure","title":"Introduction to renv","text":"Now ’ve got basic usage renv belt, ’s time learn bit lockfile works. won’t typically edit file directly, ’ll see changing git commits, ’s good sense looks like. lockfile always called renv.lock json file records information needed recreate project future. ’s example lockfile, markdown package installed CRAN mime package installed GitHub: can see json file two main components: R Packages. R component contains version R used, list repositories packages installed . Packages contains one record package used project, including details needed re-install exact version. fields written package record derived installed package’s DESCRIPTION file, include data required recreate installation, regardless whether package installed CRAN, Bioconductor, GitHub, Gitlab, Bitbucket, elsewhere. can learn sources renv supports vignette(\"package-sources\").","code":"{ \"R\": { \"Version\": \"4.4.1\", \"Repositories\": [ { \"Name\": \"CRAN\", \"URL\": \"https://cloud.r-project.org\" } ] }, \"Packages\": { \"markdown\": { \"Package\": \"markdown\", \"Version\": \"1.0\", \"Source\": \"Repository\", \"Repository\": \"CRAN\", \"Hash\": \"4584a57f565dd7987d59dda3a02cfb41\" }, \"mime\": { \"Package\": \"mime\", \"Version\": \"0.12.1\", \"Source\": \"GitHub\", \"RemoteType\": \"github\", \"RemoteHost\": \"api.github.com\", \"RemoteUsername\": \"yihui\", \"RemoteRepo\": \"mime\", \"RemoteRef\": \"main\", \"RemoteSha\": \"1763e0dcb72fb58d97bab97bb834fc71f1e012bc\", \"Requirements\": [ \"tools\" ], \"Hash\": \"c2772b6269924dad6784aaa1d99dbb86\" } } }"},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"caveats","dir":"Articles","previous_headings":"","what":"Caveats","title":"Introduction to renv","text":"important emphasize renv panacea reproducibility. Rather, tool can help make projects reproducible helping one part overall problem: R packages. number pieces renv doesn’t currently provide much help : R version: renv tracks, doesn’t help , version R used project. renv can’t easily help ’s run inside R, might find tools like rig helpful, make easier switch multiple version R one computer. Pandoc: rmarkdown package relies heavily pandoc, pandoc bundled rmarkdown package. means restoring rmarkdown lockfile insufficient guarantee exactly rendering RMarkdown documents. causes problems , might find tools provided pandoc package useful. Operating system, versions system libraries, compiler versions: Keeping ‘stable’ machine image separate challenge, Docker one popular solution. See vignette(\"docker\", package = \"renv\") recommendations Docker can used together renv. also need aware package installation may fail package originally installed binary, binary longer available. renv attempt install package source, can (often ) fail due missing system prerequisites. Ultimately, making project reproducible always require thought, just mechanical usage tool: mean particular project reproducible, can use tools meet particular goal reproducibility?","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/renv.html","id":"uninstalling-renv","dir":"Articles","previous_headings":"","what":"Uninstalling renv","title":"Introduction to renv","text":"find renv isn’t right fit project, deactivating uninstalling easy. deactivate renv project, use renv::deactivate(). removes renv auto-loader project .Rprofile, doesn’t touch renv files used project. ’d like later re-activate renv, can renv::activate(). completely remove renv project, call renv::deactivate(clean = TRUE). later want use renv project, ’ll need start scratch renv::init(). want stop using renv projects, ’ll also want remove renv's global infrastructure following R code6: can uninstall renv package utils::remove.packages(\"renv\").","code":"root <- renv::paths$root() unlink(root, recursive = TRUE)"},{"path":"https://rstudio.github.io/renv/dev/articles/rsconnect.html","id":"publishing-from-the-rstudio-ide","dir":"Articles","previous_headings":"","what":"Publishing from the RStudio IDE","title":"Using renv with Posit Connect","text":"RStudio IDE includes button push-button deployment RStudio Connect: option used deploy content RStudio Connect, manifest file automatically generated sent RStudio Connect describing project environment. manifest file reflect project environment create managed renv. renv generated .Rprofile file included deployments RStudio Connect.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/rsconnect.html","id":"publishing-programatically","dir":"Articles","previous_headings":"","what":"Publishing programatically","title":"Using renv with Posit Connect","text":"publishing content RStudio Connect programatically, necessary generate manifest file describing project environment. can done writeManifest() function rsconnect package. using renv, thing needs considered rsconnect installed executed within renv environment recognizes local project library generating manifest file. long rsconnect run within renv created environment, capture project dependencies local renv library. can accomplished opening project RStudio starting R session project root directory. renv generated .Rprofile file included deployments RStudio Connect.","code":""},{"path":"https://rstudio.github.io/renv/dev/articles/rsconnect.html","id":"a-word-about-packrat","dir":"Articles","previous_headings":"","what":"A word about packrat","title":"Using renv with Posit Connect","text":"RStudio Connect uses packrat restore project environments RStudio Connect server. impact user develops content RStudio Connect. necessary user use packrat instead renv developing content, environment management tool used locally impact tools RStudio Connect uses environment management. Therefore, concerns using renv develop content deployed RStudio Connect.","code":""},{"path":"https://rstudio.github.io/renv/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Kevin Ushey. Author, maintainer. Hadley Wickham. Author. . Copyright holder, funder.","code":""},{"path":"https://rstudio.github.io/renv/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ushey K, Wickham H (2024). renv: Project Environments. R package version 1.0.7.9000, https://github.com/rstudio/renv, https://rstudio.github.io/renv/.","code":"@Manual{, title = {renv: Project Environments}, author = {Kevin Ushey and Hadley Wickham}, year = {2024}, note = {R package version 1.0.7.9000, https://github.com/rstudio/renv}, url = {https://rstudio.github.io/renv/}, }"},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Project Environments","text":"renv package1 helps create reproducible environments R projects. Use renv make R projects isolated, portable reproducible. Isolated: Installing new updated package one project won’t break projects, vice versa. ’s renv gives project private library. Portable: Easily transport projects one computer another, even across different platforms. renv makes easy install packages project depends . Reproducible: renv records exact package versions depend , ensures exact versions ones get installed wherever go.","code":""},{"path":"https://rstudio.github.io/renv/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Project Environments","text":"Install latest version renv CRAN :","code":"install.packages(\"renv\")"},{"path":"https://rstudio.github.io/renv/dev/index.html","id":"workflow","dir":"","previous_headings":"","what":"Workflow","title":"Project Environments","text":"Use renv::init() initialize renv new existing project. set project library, containing packages ’re currently using. packages (metadata needed reinstall ) recorded lockfile, renv.lock, .Rprofile ensures library used every time open project. continue work project, install upgrade packages, either using install.packages() update.packages() renv::install() renv::update(). ’ve confirmed code works expected, use renv::snapshot() record packages sources lockfile. Later, need share code someone else run code new machine, collaborator () can call renv::restore() reinstall specific package versions recorded lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/index.html","id":"learning-more","dir":"","previous_headings":"","what":"Learning more","title":"Project Environments","text":"first time using renv, strongly recommend starting Introduction renv vignette: help understand important verbs nouns renv. question renv, please first check FAQ see whether question already addressed. hasn’t, please feel free ask Posit Forum. believe ’ve found bug renv, please file bug (, possible, reproducible example) https://github.com/rstudio/renv/issues.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":null,"dir":"Reference","previous_headings":"","what":"Activate or deactivate a project — activate","title":"Activate or deactivate a project — activate","text":"activate() enables renv project current session future sessions. generally need call activate() called automatically init(), best way start using renv new project. activate() first calls scaffold() set project infrastructure. importantly, creates project library adds auto-loader .Rprofile ensure project library automatically used future instances project. restarts session use auto-loader. deactivate() removes infrastructure added activate(), restarts session. default remove auto-loader .Rprofile; use clean = TRUE also delete lockfile project library.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Activate or deactivate a project — activate","text":"","code":"activate(project = NULL, profile = NULL) deactivate(project = NULL, clean = FALSE)"},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Activate or deactivate a project — activate","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. profile profile activated. See vignette(\"profiles\", package = \"renv\") information. clean TRUE, also remove renv/ directory lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Activate or deactivate a project — activate","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":"temporary-deactivation","dir":"Reference","previous_headings":"","what":"Temporary deactivation","title":"Activate or deactivate a project — activate","text":"need temporarily disable autoload activation can set RENV_CONFIG_AUTOLOADER_ENABLED envvar, e.g. Sys.setenv(RENV_CONFIG_AUTOLOADER_ENABLED = \"false\").","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/activate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Activate or deactivate a project — activate","text":"","code":"if (FALSE) { # \\dontrun{ # activate the current project renv::activate() # activate a separate project renv::activate(project = \"~/projects/analysis\") # deactivate the currently-activated project renv::deactivate() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/autoload.html","id":null,"dir":"Reference","previous_headings":"","what":"Auto-load the active project — autoload","title":"Auto-load the active project — autoload","text":"Automatically load renv project associated particular directory. renv search parent directories renv project root; found, project loaded via load().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/autoload.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Auto-load the active project — autoload","text":"","code":"autoload()"},{"path":"https://rstudio.github.io/renv/dev/reference/autoload.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Auto-load the active project — autoload","text":"enable renv auto-loader, can place: site-wide user .Rprofile ensure renv projects automatically loaded newly-launched R sessions, even R sessions launched within sub-directory renv project. like launch R within sub-directory renv project without auto-loading renv, can set environment variable: starting R. Note renv::autoload() compatible projects using renv 0.15.3 newer, relies features within renv/activate.R script generated newer versions renv.","code":"renv::autoload() RENV_AUTOLOAD_ENABLED = FALSE"},{"path":"https://rstudio.github.io/renv/dev/reference/checkout.html","id":null,"dir":"Reference","previous_headings":"","what":"Checkout a repository — checkout","title":"Checkout a repository — checkout","text":"renv::checkout() can used retrieve latest-availabe packages (set ) package repositories.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/checkout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checkout a repository — checkout","text":"","code":"checkout( repos = NULL, ..., packages = NULL, date = NULL, clean = FALSE, actions = \"restore\", project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/checkout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checkout a repository — checkout","text":"repos R package repositories use. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. packages packages installed. NULL (default), packages currently used project installed, determined dependencies(). recursive dependencies packages included well. date snapshot date use. set, associated snapshot available Posit's public Package Manager instance used. Ignored repos non-NULL. clean Boolean; remove packages recorded lockfile target library? Use clean = TRUE like library state exactly reflect lockfile contents restore(). actions action(s) perform requested repositories. can either \"snapshot\", renv generate lockfile based latest versions packages available repos, \"restore\" like install packages. can use c(\"snapshot\", \"restore\") like generate lockfile install packages step. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/checkout.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checkout a repository — checkout","text":"renv::checkout() useful services like Posit's Package Manager, can used switch different repository snapshots within renv project. way, can upgrade (downgrade) packages used particular renv project package versions provided particular snapshot. library contains packages installed remote sources (e.g. GitHub), version package name provided repositories checked , please aware package replaced version provided requested repositories. concern project uses R packages GitHub whose name matches existing CRAN package, otherwise unrelated package CRAN.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/checkout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checkout a repository — checkout","text":"","code":"if (FALSE) { # \\dontrun{ # check out packages from PPM using the date '2023-01-02' renv::checkout(date = \"2023-01-02\") # alternatively, supply the full repository path renv::checkout(repos = \"https://packagemanager.rstudio.com/cran/2023-01-02\") # only check out some subset of packages (and their recursive dependencies) renv::checkout(packages = \"dplyr\", date = \"2023-01-02\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean a project — clean","title":"Clean a project — clean","text":"Clean project associated R libraries.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean a project — clean","text":"","code":"clean(project = NULL, ..., actions = NULL, prompt = interactive())"},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean a project — clean","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. actions set clean actions take. See documentation Actions list available actions, default actions taken actions supplied. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean a project — clean","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":"actions","dir":"Reference","previous_headings":"","what":"Actions","title":"Clean a project — clean","text":"following clean actions available: package.locks package installation, R create package locks library path, typically named 00LOCK-. occasion, package installation fails R terminated installing package, locks can left behind inhibit future attempts reinstall package. Use action remove left-package locks. library.tempdirs package installation, R may create temporary directories names form file\\w{12}, occasion files can left behind even longer use. Use action remove left-directories. system.library general, recommended packages distributed R installed default library (library path referred .Library). Use action remove user-installed packages installed system library. action destructive, default never run – must explicitly requested user. unused.packages Remove packages installed project library, longer appear used project sources. action destructive, default run interactive sessions prompting enabled.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/clean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean a project — clean","text":"","code":"if (FALSE) { # \\dontrun{ # clean the current project renv::clean() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":null,"dir":"Reference","previous_headings":"","what":"User-level settings — config","title":"User-level settings — config","text":"Configure different behaviors renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User-level settings — config","text":"","code":"config"},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"User-level settings — config","text":"given configuration option: R option form renv.config. available, option's value used; environment variable form RENV_CONFIG_ available, option's value used; Otherwise, default particular configuration value used. periods (.)s option name transformed underscores (_) environment variable name, vice versa. example, configuration option auto.snapshot configured : options(renv.config.auto.snapshot = <...>) Sys.setenv(RENV_CONFIG_AUTO_SNAPSHOT = <...>) Note R option environment variable defined, R option used instead. Environment variables can useful want particular configuration automatically inherited child processes; behavior desired, R option may preferred. want set persist options across multiple projects, recommended set startup .Renviron file; e.g. ~/.Renviron, R installation's etc/Rprofile.site file. See Startup details. Configuration options can also set within project .Rprofile, aware options set source(\"renv/activate.R\") called.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"configuration","dir":"Reference","previous_headings":"","what":"Configuration","title":"User-level settings — config","text":"following renv configuration options available:","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-activate-prompt","dir":"Reference","previous_headings":"","what":"renv.config.activate.prompt","title":"User-level settings — config","text":"Automatically prompt user activate current project, appear already activated? mainly useful help ensure calls renv::snapshot() renv::restore() use project library. See ?renv::activate details. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-autoloader-enabled","dir":"Reference","previous_headings":"","what":"renv.config.autoloader.enabled","title":"User-level settings — config","text":"Enable renv auto-loader? FALSE, renv automatically load project containing renv autoloader within .Rprofile. addition, renv write project auto-loader calls renv::init(). Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-auto-snapshot","dir":"Reference","previous_headings":"","what":"renv.config.auto.snapshot","title":"User-level settings — config","text":"Automatically snapshot changes project library project dependencies change? Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-bitbucket-host","dir":"Reference","previous_headings":"","what":"renv.config.bitbucket.host","title":"User-level settings — config","text":"default Bitbucket host used package retrieval. Defaults \"api.bitbucket.org/2.0\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-copy-method","dir":"Reference","previous_headings":"","what":"renv.config.copy.method","title":"User-level settings — config","text":"method use attempting copy directories. See Copy Methods information. Defaults \"auto\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-connect-timeout","dir":"Reference","previous_headings":"","what":"renv.config.connect.timeout","title":"User-level settings — config","text":"amount time spend (seconds) attempting download file. applicable curl downloader used. Defaults 20L.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-connect-retry","dir":"Reference","previous_headings":"","what":"renv.config.connect.retry","title":"User-level settings — config","text":"number times attempt re-downloading file, transient download errors occur. applicable curl downloader used. Defaults 3L.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-cache-enabled","dir":"Reference","previous_headings":"","what":"renv.config.cache.enabled","title":"User-level settings — config","text":"Enable global renv package cache? active, renv install packages global cache, link copy packages cache R library appropriate. can greatly save disk space install time R packages shared across multiple projects environment. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-cache-symlinks","dir":"Reference","previous_headings":"","what":"renv.config.cache.symlinks","title":"User-level settings — config","text":"Symlink packages global renv package cache project library? TRUE, renv use symlinks (, Windows, junction points) reference packages installed cache. Set FALSE prefer copy packages cache project library. Enabled default, except Windows feature enabled project library global package cache volume. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-dependency-errors","dir":"Reference","previous_headings":"","what":"renv.config.dependency.errors","title":"User-level settings — config","text":"Many renv APIs require enumeration project's R package dependencies. option controls errors occur enumeration handled. default, errors reported non-fatal. Set \"fatal\" force errors fatal, \"ignored\" ignore errors altogether. See dependencies() details. Defaults \"reported\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-dependencies-limit","dir":"Reference","previous_headings":"","what":"renv.config.dependencies.limit","title":"User-level settings — config","text":"default, renv reports discovers many files looking dependencies, may indicate running dependencies() wrong place. Set Inf disable warning. Defaults 1000L.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-exported-functions","dir":"Reference","previous_headings":"","what":"renv.config.exported.functions","title":"User-level settings — config","text":"library(renv) called, exports placed search path? Set FALSE avoid issues can arise , example, renv::load() masking base::load(). general, recommend referencing renv functions namespace explicitly; e.g. prefer renv::snapshot() snapshot(). default, exported renv functions attached placed search path, backwards compatibility existing scripts using renv. Defaults \"*\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-external-libraries","dir":"Reference","previous_headings":"","what":"renv.config.external.libraries","title":"User-level settings — config","text":"character vector external libraries, used tandem projects. careful using external libraries: possible things can break within project version(s) packages used project library happen incompatible packages external libraries; example, project required xyz 1.0 xyz 1.1 present loaded external library. Can also R function provides paths external libraries. Library paths expanded via .expand_R_libs_env_var() necessary. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-filebacked-cache","dir":"Reference","previous_headings":"","what":"renv.config.filebacked.cache","title":"User-level settings — config","text":"Enable renv file-backed cache? enabled, renv cache contents files read (e.g. DESCRIPTION files) memory, thereby avoiding re-reading file contents filesystem file changed. renv uses file mtime determine file changed; consider disabling mtime unreliable system. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-github-host","dir":"Reference","previous_headings":"","what":"renv.config.github.host","title":"User-level settings — config","text":"default GitHub host used package retrieval. Defaults \"api.github.com\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-gitlab-host","dir":"Reference","previous_headings":"","what":"renv.config.gitlab.host","title":"User-level settings — config","text":"default GitLab host used package retrieval. Defaults \"gitlab.com\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-hydrate-libpaths","dir":"Reference","previous_headings":"","what":"renv.config.hydrate.libpaths","title":"User-level settings — config","text":"character vector library paths, used hydrate() attempting hydrate projects. empty, default set library paths (documented ?renv::hydrate) used instead. See hydrate() details. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-build","dir":"Reference","previous_headings":"","what":"renv.config.install.build","title":"User-level settings — config","text":"downloaded package archives built (via R CMD build) installation? TRUE, package vignettes also built part package installation. building packages installation may require packages within 'Suggests' available, option enabled default. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-remotes","dir":"Reference","previous_headings":"","what":"renv.config.install.remotes","title":"User-level settings — config","text":"renv read package's Remotes: field determining package dependencies installed? Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-shortcuts","dir":"Reference","previous_headings":"","what":"renv.config.install.shortcuts","title":"User-level settings — config","text":"Allow set 'shortcuts' installing packages renv? enabled, renv discovers package installed already available within user site libraries, install local copy package. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-staged","dir":"Reference","previous_headings":"","what":"renv.config.install.staged","title":"User-level settings — config","text":"DEPRECATED: Please use renv.config.install.transactional instead. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-transactional","dir":"Reference","previous_headings":"","what":"renv.config.install.transactional","title":"User-level settings — config","text":"Perform transactional install packages install restore? enabled, renv first install packages temporary library, later copy move packages back project library packages successfully downloaded installed. can useful like avoid mutating project library installation one packages fails. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-install-verbose","dir":"Reference","previous_headings":"","what":"renv.config.install.verbose","title":"User-level settings — config","text":"verbose installing R packages sources? TRUE, renv stream output generated package build + installation console. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-locking-enabled","dir":"Reference","previous_headings":"","what":"renv.config.locking.enabled","title":"User-level settings — config","text":"Use interprocess locks invoking methods might mutate project library? Enable allow multiple processes use renv project, minimizing risks relating concurrent access project library. Disable encounter locking issues. Locks stored files within project renv/lock; need manually remove stale lock can via unlink(\"renv/lock\", recursive = TRUE). Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-mran-enabled","dir":"Reference","previous_headings":"","what":"renv.config.mran.enabled","title":"User-level settings — config","text":"DEPRECATED: MRAN longer maintained Microsoft. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-pak-enabled","dir":"Reference","previous_headings":"","what":"renv.config.pak.enabled","title":"User-level settings — config","text":"Use pak package install packages? Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-ppm-enabled","dir":"Reference","previous_headings":"","what":"renv.config.ppm.enabled","title":"User-level settings — config","text":"Boolean; enable Posit Package Manager integration renv projects? TRUE, renv attempt transform repository URLs used PPM binary URLs appropriate current Linux platform. Set FALSE like continue using source-PPM URLs, find renv improperly transforming repository URLs. can still set use PPM repositories option disabled; controls whether renv tries transform source repository URLs binary URLs behalf. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-ppm-default","dir":"Reference","previous_headings":"","what":"renv.config.ppm.default","title":"User-level settings — config","text":"Boolean; new projects use Posit Public Package Manager instance default? TRUE (default), projects initialized renv::init() use P3M instance repos R option already set means (example, startup .Rprofile). Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-ppm-url","dir":"Reference","previous_headings":"","what":"renv.config.ppm.url","title":"User-level settings — config","text":"default PPM URL used new renv projects. Defaults CRAN mirror maintained Posit https://packagemanager.posit.co/. option can changed like renv use alternate package manager instance. Defaults \"https://packagemanager.posit.co/cran/latest\".","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-repos-override","dir":"Reference","previous_headings":"","what":"renv.config.repos.override","title":"User-level settings — config","text":"Override R package repositories used restore()? Primarily useful deployment / continuous integration, might want enforce usage set repositories defined renv.lock otherwise set R session. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-rspm-enabled","dir":"Reference","previous_headings":"","what":"renv.config.rspm.enabled","title":"User-level settings — config","text":"DEPRECATED: Please use renv.config.ppm.enabled instead. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-sandbox-enabled","dir":"Reference","previous_headings":"","what":"renv.config.sandbox.enabled","title":"User-level settings — config","text":"Enable sandboxing renv projects? active, renv attempt sandbox system library, preventing non-system packages installed system library becoming available renv projects. (, packages priority \"base\" \"recommended\", reported installed.packages(), made available.) Sandboxing done linking copying system packages separate library path, instructing R use library path system library path. environments, action can take large amount time – case, may want disable renv sandbox. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-shims-enabled","dir":"Reference","previous_headings":"","what":"renv.config.shims.enabled","title":"User-level settings — config","text":"renv shims installed package load? enabled, renv install shims functions install.packages(), update.packages() remove.packages(), delegating functions install(), update() remove() appropriate. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-snapshot-inference","dir":"Reference","previous_headings":"","what":"renv.config.snapshot.inference","title":"User-level settings — config","text":"packages installed local sources, renv try infer package's remote DESCRIPTION file? TRUE, renv check prompt update package's DESCRIPTION file remote source can ascertained. Currently, implemented packages hosted GitHub. Note check performed interactive R sessions. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-snapshot-validate","dir":"Reference","previous_headings":"","what":"renv.config.snapshot.validate","title":"User-level settings — config","text":"Validate R package dependencies calling snapshot? TRUE, renv attempt diagnose potential issues project library creating renv.lock – example, package installed project library depends package currently installed. Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-startup-quiet","dir":"Reference","previous_headings":"","what":"renv.config.startup.quiet","title":"User-level settings — config","text":"quiet startup? set, renv display typical Project loaded. [renv ] banner startup. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-synchronized-check","dir":"Reference","previous_headings":"","what":"renv.config.synchronized.check","title":"User-level settings — config","text":"Check project library synchronized lockfile load? Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-updates-check","dir":"Reference","previous_headings":"","what":"renv.config.updates.check","title":"User-level settings — config","text":"Check package updates session initialized? can useful like ensure project lockfile remains --date packages released CRAN. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-updates-parallel","dir":"Reference","previous_headings":"","what":"renv.config.updates.parallel","title":"User-level settings — config","text":"Check package updates parallel? can useful large number packages installed non-CRAN remotes installed, packages can checked updates parallel. Defaults 2L.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-user-environ","dir":"Reference","previous_headings":"","what":"renv.config.user.environ","title":"User-level settings — config","text":"Load user R environ (typically located ~/.Renviron) renv loaded? Defaults TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-user-library","dir":"Reference","previous_headings":"","what":"renv.config.user.library","title":"User-level settings — config","text":"Include system library library paths projects? Note risks breaking project encapsulation recommended projects intend share collaborate users. See also caveats renv.config.external.libraries option. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"renv-config-user-profile","dir":"Reference","previous_headings":"","what":"renv.config.user.profile","title":"User-level settings — config","text":"Load user R profile (typically located ~/.Rprofile) renv loaded? disabled default, running arbitrary code user ~/.Rprofile risk breaking project encapsulation. goal set environment variables visible within renv projects, placing ~/.Renviron often better choice. Defaults FALSE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"copy-methods","dir":"Reference","previous_headings":"","what":"Copy methods","title":"User-level settings — config","text":"find renv unable copy directories environment, may want try setting copy.method option. default, renv try choose system tool likely succeed copying files system – robocopy Windows, cp Unix. renv also instruct tools preserve timestamps attributes copying files. However, can select different method appropriate. following methods supported: can also provide custom copy method required; e.g. Note renv always first attempt copy directory first temporary path within target folder, rename temporary path final target destination. helps avoid issues failed attempt copy directory leave half-copied directory behind final location.","code":"options(renv.config.copy.method = function(src, dst) { # copy a file from 'src' to 'dst' })"},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"project-local-settings","dir":"Reference","previous_headings":"","what":"Project-local settings","title":"User-level settings — config","text":"settings persist alongside particular project, various settings available settings can used.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"User-level settings — config","text":"","code":"# disable automatic snapshots options(renv.config.auto.snapshot = FALSE) # disable with environment variable Sys.setenv(RENV_CONFIG_AUTO_SNAPSHOT = FALSE)"},{"path":"https://rstudio.github.io/renv/dev/reference/consent.html","id":null,"dir":"Reference","previous_headings":"","what":"Consent to usage of renv — consent","title":"Consent to usage of renv — consent","text":"Provide consent renv, allowing write update certain files filesystem.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/consent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Consent to usage of renv — consent","text":"","code":"consent(provided = FALSE)"},{"path":"https://rstudio.github.io/renv/dev/reference/consent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Consent to usage of renv — consent","text":"provided default provided response. need provide consent non-interactive R session, can invoke renv::consent(provided = TRUE) explicitly.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/consent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Consent to usage of renv — consent","text":"TRUE consent provided, R error otherwise.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/consent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Consent to usage of renv — consent","text":"part normal operation, renv write update files project directory, well application-specific cache directory. paths documented within paths. accordance CRAN Repository Policy, renv must first obtain consent , user, actions can taken. Please call renv::consent() first provide consent. can also set R option: implicitly provide consent e.g. non-interactive R sessions.","code":"options(renv.consent = TRUE)"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":null,"dir":"Reference","previous_headings":"","what":"Find R package dependencies in a project — dependencies","title":"Find R package dependencies in a project — dependencies","text":"dependencies() crawl files within project, looking R files packages used within R files. done primarily parsing code looking calls form library(package), require(package), requireNamespace(\"package\"), package::method(). renv also supports package loading box (box::use(...)) pacman (pacman::p_load(...)) . R package projects, dependencies expressed DESCRIPTION file also discovered. Note rmarkdown package required order crawl dependencies R Markdown files.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find R package dependencies in a project — dependencies","text":"","code":"dependencies( path = getwd(), root = NULL, ..., quiet = NULL, progress = TRUE, errors = c(\"reported\", \"fatal\", \"ignored\"), dev = FALSE )"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find R package dependencies in a project — dependencies","text":"path path .R, .Rmd, .qmd, DESCRIPTION, directory containing files, R function. default uses files found within current working directory children. root root directory used dependency discovery. Defaults active project directory. may need set explicitly ensure project's .renvignores () properly handled. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. quiet Boolean; quiet checking dependencies? Setting quiet = TRUE equivalent setting progress = FALSE errors = \"ignored\", overrides options NULL. progress Boolean; report progress output enumerating dependencies? errors errors occur dependency enumeration handled? \"reported\" (default): errors reported user, otherwise ignored. \"fatal\": errors fatal stop execution. \"ignored\": errors ignored reported user. dev Boolean; include development dependencies? packages typically required developing project, running (.e. want installed humans working project computers deploying ). Development dependencies include packages listed Suggests field DESCRIPTION found project root, roxygen2 devtools use implied project metadata. also include packages used ~/.Rprofile config$user.profile() TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find R package dependencies in a project — dependencies","text":"R data.frame discovered dependencies, mapping inferred package names files discovered. Note Package field might name package remote, rather just plain package name.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"missing-dependencies","dir":"Reference","previous_headings":"","what":"Missing dependencies","title":"Find R package dependencies in a project — dependencies","text":"dependencies() uses static analysis determine packages used project. means inspects, run, source. Static analysis generally works well, 100% reliable detecting packages required project. example, renv unable detect kind usage: also generally tell one packages use, uses one suggested packages. example, tidyr::separate_wider_delim() uses stringr package suggested, required tidyr. find renv's dependency discovery misses one packages actually use project, one escape hatch include file called _dependencies.R includes straightforward library calls:","code":"for (package in c(\"dplyr\", \"ggplot2\")) { library(package, character.only = TRUE) } library(dplyr) library(ggplot2) library(stringr)"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"explicit-dependencies","dir":"Reference","previous_headings":"","what":"Explicit dependencies","title":"Find R package dependencies in a project — dependencies","text":"Alternatively, can suppress dependency discover instead rely explicit set packages recorded project DESCRIPTION file. Call renv::settings$snapshot.type(\"explicit\") enable \"explicit\" mode, enumerate dependencies project DESCRIPTION file. case, DESCRIPTION might look something like :","code":"Type: project Description: My project. Depends: tidyverse, devtools, shiny, data.table"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"ignoring-files","dir":"Reference","previous_headings":"","what":"Ignoring files","title":"Find R package dependencies in a project — dependencies","text":"default, renv read project's .gitignores (present) determine whether certain files folders included traversing directories. preferred, can also create .renvignore file (entries format standard .gitignore file) tell renv files ignore within directory. .renvignore .gitignore exist within folder, .renvignore used lieu .gitignore. See https://git-scm.com/docs/gitignore documentation .gitignore format. simple examples : Using ignore files important project contains large number files; example, data/ directory containing many text files.","code":"# ignore all R Markdown files *.Rmd # ignore all data folders data/ # ignore only data folders from the root of the project /data/"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"errors","dir":"Reference","previous_headings":"","what":"Errors","title":"Find R package dependencies in a project — dependencies","text":"renv's attempts enumerate package dependencies project can fail – commonly, failures attempting parse R code. can use errors argument suppress problems, robust solution tell renv look problematic code. well using .renvignore, described , can also suppress errors discovered within individual .Rmd chunks including renv.ignore=TRUE chunk header. example: Similarly, like renv parse chunk otherwise ignored (e.g. eval=FALSE chunk header), can set:","code":"```{r chunk-label, renv.ignore=TRUE} # code in this chunk will be ignored by renv ``` ```{r chunk-label, eval=FALSE, renv.ignore=FALSE} # code in this chunk will _not_ be ignored ```"},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"development-dependencies","dir":"Reference","previous_headings":"","what":"Development dependencies","title":"Find R package dependencies in a project — dependencies","text":"renv support distinguishing development run-time dependencies. example, Shiny app might rely ggplot2 (run-time dependency) use usethis development, app need run (.e. development dependency). can record development dependencies listing Suggests field project's DESCRIPTION file. Development dependencies installed install() (called without arguments) tracked project snapshot. need greater control, can also try project profiles discussed vignette(\"profiles\").","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/dependencies.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find R package dependencies in a project — dependencies","text":"","code":"if (FALSE) { # \\dontrun{ # find R package dependencies in the current directory renv::dependencies() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/diagnostics.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a diagnostics report — diagnostics","title":"Print a diagnostics report — diagnostics","text":"Print diagnostics report, summarizing state project using renv. report can occasionally useful diagnosing issues renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/diagnostics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a diagnostics report — diagnostics","text":"","code":"diagnostics(project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/diagnostics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a diagnostics report — diagnostics","text":"project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/diagnostics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a diagnostics report — diagnostics","text":"function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/embed.html","id":null,"dir":"Reference","previous_headings":"","what":"Capture and re-use dependencies within a .R or .Rmd — embed","title":"Capture and re-use dependencies within a .R or .Rmd — embed","text":"Together, embed() use() provide lightweight way specify restore package versions within file. use() lightweight lockfile specification embed() can automatically generate insert script document. Calling embed() inspects dependencies specified document generates inserts call use() looks something like : , next run R script render .Rmd, use() : Create temporary library path. Install requested packages recursive dependencies library. Activate library, used rest script.","code":"renv::use( \"digest@0.6.30\", \"rlang@0.3.4\" )"},{"path":"https://rstudio.github.io/renv/dev/reference/embed.html","id":"manual-usage","dir":"Reference","previous_headings":"","what":"Manual usage","title":"Capture and re-use dependencies within a .R or .Rmd — embed","text":"can also create calls use() , either specifying packages needed hand, supplying path lockfile, renv::use(lockfile = \"/path//renv.lock\"). can useful projects like associate different lockfiles different documents, blog want post capture dependencies time writing. finished writing , post, can use renv::snapshot(lockfile = \"/path//renv.lock\") \"save\" state active authoring bost, use renv::use(lockfile = \"/path//renv.lock\") document ensure blog post always uses dependencies onfuture renders. renv::use() inspired part groundhog package, also allows one specify script's R package requirements within R script.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/embed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capture and re-use dependencies within a .R or .Rmd — embed","text":"","code":"embed(path = NULL, ..., lockfile = NULL, project = NULL) use( ..., lockfile = NULL, library = NULL, isolate = sandbox, sandbox = TRUE, attach = FALSE, verbose = TRUE )"},{"path":"https://rstudio.github.io/renv/dev/reference/embed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capture and re-use dependencies within a .R or .Rmd — embed","text":"path path R R Markdown script. default use current document, running within RStudio. ... R packages used script. Ignored lockfile non-NULL. lockfile lockfile use. supplied, renv use packages declared lockfile. project project directory. NULL, active project used. project currently active, current working directory used instead. library library path requested packages installed. NULL (default), library path within R temporary directory generated used. Note library path re-used future calls renv::use(), allowing renv::use() used multiple times within single script. isolate Boolean; active library paths included set library paths activated script? Set TRUE want packages provided renv::use() visible library paths. sandbox system library sandboxed? See sandbox documentation config details. can also provide explicit sandbox path want configure renv::use() generates sandbox. default, sandbox generated within R temporary directory. attach Boolean; set requested packages automatically attached? TRUE, packages loaded attached via call library() install. Ignored lockfile non-NULL. verbose Boolean; verbose installing packages?","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/embed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capture and re-use dependencies within a .R or .Rmd — embed","text":"function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/equip.html","id":null,"dir":"Reference","previous_headings":"","what":"Install required system libraries — equip","title":"Install required system libraries — equip","text":"Equip system libraries commonly-used compilation base recommended R packages. previously useful older versions R windows, longer terribly helpful.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/equip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install required system libraries — equip","text":"","code":"equip()"},{"path":"https://rstudio.github.io/renv/dev/reference/equip.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install required system libraries — equip","text":"function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/equip.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install required system libraries — equip","text":"","code":"if (FALSE) { # \\dontrun{ # download useful build tools renv::equip() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a Package Dependency Graph — graph","title":"Generate a Package Dependency Graph — graph","text":"Generate package dependency graph.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a Package Dependency Graph — graph","text":"","code":"graph( root = NULL, leaf = NULL, ..., suggests = FALSE, enhances = FALSE, resolver = NULL, renderer = c(\"DiagrammeR\", \"visNetwork\"), attributes = list(), project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a Package Dependency Graph — graph","text":"root top-package dependencies interest dependency graph. leaf bottom-package dependencies interest dependency graph. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. suggests suggested packages included within dependency graph? enhances enhanced packages included within dependency graph? resolver R function accepting package name, returning contents DESCRIPTION file (R data.frame list). NULL (default), internal resolver used. renderer package used render resulting graph? attributes R list graphViz attributes, mapping node names attribute key-value pairs. example, ask graphViz prefer orienting graph left right, can use list(graph = c(rankdir = \"LR\")). project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate a Package Dependency Graph — graph","text":"","code":"if (FALSE) { # \\dontrun{ # graph the relationship between devtools and rlang graph(root = \"devtools\", leaf = \"rlang\") # figure out why a project depends on 'askpass' graph(leaf = \"askpass\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/history.html","id":null,"dir":"Reference","previous_headings":"","what":"View and revert to a historical lockfile — history","title":"View and revert to a historical lockfile — history","text":"history() uses version control system show prior versions lockfile revert() allows restore one . functions currently implemented projects use git.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/history.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"View and revert to a historical lockfile — history","text":"","code":"history(project = NULL) revert(commit = \"HEAD\", ..., project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/history.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"View and revert to a historical lockfile — history","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. commit commit associated prior version lockfile. ... Optional arguments; currently unused.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/history.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"View and revert to a historical lockfile — history","text":"history() returns data.frame summarizing commits renv.lock changed. revert() usually called side-effect also invisibly returns commit used.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/history.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"View and revert to a historical lockfile — history","text":"","code":"if (FALSE) { # \\dontrun{ # get history of previous versions of renv.lock in VCS db <- renv::history() # choose an older commit commit <- db$commit[5] # revert to that version of the lockfile renv::revert(commit = commit) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/hydrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Copy packages from user libraries to a project library — hydrate","title":"Copy packages from user libraries to a project library — hydrate","text":"hydrate() installs missing packages user library project library. hydrate() called automatically init(), rare need otherwise, can easily get project inconsistent state. may occasionally useful call hydrate(update = \"\") want update project packages match installed global library (opposed using update() get latest versions CRAN). case, verify code continues work, call snapshot() record updated package versions lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/hydrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Copy packages from user libraries to a project library — hydrate","text":"","code":"hydrate( packages = NULL, ..., library = NULL, repos = getOption(\"repos\"), update = FALSE, sources = NULL, prompt = interactive(), report = TRUE, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/hydrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Copy packages from user libraries to a project library — hydrate","text":"packages set R packages install. NULL, packages found dependencies() used. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. library R library hydrated. NULL, active library reported .libPaths() used. repos R repositories used. project depends R packages found within user library paths, packages installed repositories instead. update Boolean; hydrate() attempt update already-installed packages requested package already installed project library? Set \"\" like packages refreshed source library possible. sources vector library paths renv look packages. NULL (default), hydrate() look system libraries (user library, site library default library) renv cache. package found locations, hydrate() try install active R repositories. prompt Boolean; prompt user taking action? Ignored report = FALSE. report Boolean; display report packages installed renv::hydrate()? project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/hydrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Copy packages from user libraries to a project library — hydrate","text":"named R list, giving packages used hydration well set packages found.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/hydrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Copy packages from user libraries to a project library — hydrate","text":"","code":"if (FALSE) { # \\dontrun{ # hydrate the active library renv::hydrate() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/imbue.html","id":null,"dir":"Reference","previous_headings":"","what":"Imbue an renv Installation — imbue","title":"Imbue an renv Installation — imbue","text":"Imbue renv installation project, thereby making requested version renv available within.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/imbue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imbue an renv Installation — imbue","text":"","code":"imbue(project = NULL, version = NULL, quiet = FALSE)"},{"path":"https://rstudio.github.io/renv/dev/reference/imbue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imbue an renv Installation — imbue","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. version version renv install. NULL, version renv currently installed used. requested version renv retrieved renv public GitHub repository, https://github.com/rstudio/renv. quiet Boolean; avoid printing output install renv?","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/imbue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imbue an renv Installation — imbue","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/imbue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imbue an renv Installation — imbue","text":"Normally, function need called directly user; invoked required init() activate().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":null,"dir":"Reference","previous_headings":"","what":"Use renv in a project — init","title":"Use renv in a project — init","text":"Call renv::init() start using renv current project. : Set project infrastructure (described scaffold()) including project library .Rprofile ensures renv used future sessions, Discover packages currently used project (via dependencies()), install project library (described hydrate()), Create lockfile records state project library can restored others (described snapshot()), Restart R (running inside RStudio). call renv::init() project already using renv, attempt right thing: restore project library missing, otherwise ask .","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use renv in a project — init","text":"","code":"init( project = NULL, ..., profile = NULL, settings = NULL, bare = FALSE, force = FALSE, repos = NULL, bioconductor = NULL, load = TRUE, restart = interactive() )"},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use renv in a project — init","text":"project project directory. NULL (default), current working directory used. R working directory changed match requested project directory. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. profile profile activated. See vignette(\"profiles\", package = \"renv\") information. settings list settings used newly-initialized project. bare Boolean; initialize project empty project library, without attempting discover install R package dependencies? force Boolean; force initialization? default, renv refuse initialize home directory project, defend accidental misusages init(). repos R repositories used project. See Repositories details. bioconductor version Bioconductor used project. Setting may appropriate renv unable determine project depends package normally available Bioconductor. Set TRUE use default version Bioconductor recommended BiocManager package. load Boolean; project loaded initialized? restart Boolean; attempt restart R session initializing project? session restart attempted \"restart\" R option set frontend hosting R.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use renv in a project — init","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":"repositories","dir":"Reference","previous_headings":"","what":"Repositories","title":"Use renv in a project — init","text":"default R repositories already set, renv use Posit Public Package Manager CRAN mirror package installation. primary benefit using mirror can provide pre-built binaries R packages variety commonly-used Linux distributions. behavior can configured disabled desired – see options config() details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use renv in a project — init","text":"","code":"if (FALSE) { # \\dontrun{ # disable automatic snapshots auto.snapshot <- getOption(\"renv.config.auto.snapshot\") options(renv.config.auto.snapshot = FALSE) # initialize a new project (with an empty R library) renv::init(bare = TRUE) # install digest 0.6.19 renv::install(\"digest@0.6.19\") # save library state to lockfile renv::snapshot() # remove digest from library renv::remove(\"digest\") # check library status renv::status() # restore lockfile, thereby reinstalling digest 0.6.19 renv::restore() # restore automatic snapshots options(renv.config.auto.snapshot = auto.snapshot) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":null,"dir":"Reference","previous_headings":"","what":"Install packages — install","title":"Install packages — install","text":"Install one R packages, variety remote sources. install() uses machinery restore() (.e. uses cached packages possible) respect lockfile, instead installing latest versions available CRAN. See vignette(\"package-install\") details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install packages — install","text":"","code":"install( packages = NULL, ..., exclude = NULL, library = NULL, type = NULL, rebuild = FALSE, repos = NULL, prompt = interactive(), dependencies = NULL, verbose = NULL, lock = FALSE, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install packages — install","text":"packages Either NULL (default) install packages required project, character vector packages install. renv supports subset remotes syntax used package installation, e.g: pkg: install latest version pkg CRAN. pkg@version: install specified version pkg CRAN. username/repo: install package GitHub bioc::pkg: install pkg Bioconductor. See https://remotes.r-lib.org/articles/dependencies.html examples details. renv deviates remotes spec one important way: subdirectories separated main repository specification :, /. install subdir subdirectory GitHub package username/repo use \"username/repo:subdir. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. exclude Packages installed. exclude useful using renv::install() install dependencies project, except specific set packages. library R library used. NULL, active project library used instead. type type package install (\"source\" \"binary\"). Defaults value getOption(\"pkgType\"). rebuild Force packages rebuilt, thereby bypassing installed versions package available cache? can either boolean (indicating installed packages rebuilt), vector package names indicating packages rebuilt. repos repositories use restoring packages installed CRAN CRAN-like repository. default, repositories recorded lockfile , ensuring (e.g.) CRAN packages re-installed CRAN mirror. Use repos = getOption(\"repos\") override repositories set current session, see repos.override option config alternate way override. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. dependencies vector DESCRIPTION field names used package dependency resolution. NULL (default), value renv::settings$package.dependency.fields used. aliases \"strong\", \"\", \"\" also supported. See tools::package_dependencies() details. verbose Boolean; report output R CMD build R CMD INSTALL installation? NULL (default), value config$install.verbose() used. FALSE, installation output emitted package fails install. lock Boolean; update renv.lock lockfile successful installation requested packages? project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install packages — install","text":"named list package records installed renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"remotes","dir":"Reference","previous_headings":"","what":"Remotes","title":"Install packages — install","text":"install() (called without arguments) respect Remotes field DESCRIPTION file (present). allows specify places install package latest version CRAN. See https://remotes.r-lib.org/articles/dependencies.html details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"bioconductor","dir":"Reference","previous_headings":"","what":"Bioconductor","title":"Install packages — install","text":"Packages Bioconductor can installed using bioc:: prefix. example, install latest-available version Biobase Bioconductor. renv depends BiocManager (, older versions R, BiocInstaller) installation packages Bioconductor. packages available, renv attempt automatically install fulfilling installation request.","code":"renv::install(\"bioc::Biobase\")"},{"path":"https://rstudio.github.io/renv/dev/reference/install.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install packages — install","text":"","code":"if (FALSE) { # \\dontrun{ # install the latest version of 'digest' renv::install(\"digest\") # install an old version of 'digest' (using archives) renv::install(\"digest@0.6.18\") # install 'digest' from GitHub (latest dev. version) renv::install(\"eddelbuettel/digest\") # install a package from GitHub, using specific commit renv::install(\"eddelbuettel/digest@df55b00bff33e945246eff2586717452e635032f\") # install a package from Bioconductor # (note: requires the BiocManager package) renv::install(\"bioc::Biobase\") # install a package, specifying path explicitly renv::install(\"~/path/to/package\") # install packages as declared in the project DESCRIPTION file renv::install() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":null,"dir":"Reference","previous_headings":"","what":"Isolate a project — isolate","title":"Isolate a project — isolate","text":"Copy packages renv cache directly project library, project can continue function independently renv cache.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Isolate a project — isolate","text":"","code":"isolate(project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Isolate a project — isolate","text":"project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Isolate a project — isolate","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Isolate a project — isolate","text":"calling isolate(), renv still able use cache future install()s restore()s. prefer renv copy packages cache, rather use symlinks, can set renv configuration option: force renv copy packages cache, opposed symlinking . like disable cache altogether project, can use: explicitly disable cache project.","code":"options(renv.config.cache.symlinks = FALSE) settings$use.cache(FALSE)"},{"path":"https://rstudio.github.io/renv/dev/reference/isolate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Isolate a project — isolate","text":"","code":"if (FALSE) { # \\dontrun{ # isolate a project renv::isolate() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a project — load","title":"Load a project — load","text":"renv::load() sets library paths use project-local library, sets system library sandbox, needed, creates shims install.packages(), update.packages(), remove.packages(). generally need call renv::load() , called automatically project auto-loader created init()/ activate(). However, needed, can use renv::load(\"\") explicitly load renv project located particular path.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a project — load","text":"","code":"load(project = NULL, quiet = FALSE, profile = NULL, ...)"},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a project — load","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. quiet Boolean; quiet load? profile profile activated. See vignette(\"profiles\", package = \"renv\") information. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load a project — load","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":"shims","dir":"Reference","previous_headings":"","what":"Shims","title":"Load a project — load","text":"help take advantage package cache, renv places couple shims search path: install.packages() instead calls renv::install(). remove.packages() instead calls renv::remove(). update.packages() instead calls renv::update(). allows keep using existing muscle memory installing, updating, remove packages, taking advantage renv features like package cache. like bypass shims within R session, can explicitly call version functions utils package, e.g. utils::install.packages(<...>). prefer use renv shims , can disabled setting R option options(renv.config.shims.enabled = FALSE) setting environment variable RENV_CONFIG_SHIMS_ENABLED = FALSE. See ?config details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/load.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load a project — load","text":"","code":"if (FALSE) { # \\dontrun{ # load a project -- note that this is normally done automatically # by the project's auto-loader, but calling this explicitly to # load a particular project may be useful in some circumstances renv::load() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile-api.html","id":null,"dir":"Reference","previous_headings":"","what":"Programmatically Create and Modify a Lockfile — lockfile-api","title":"Programmatically Create and Modify a Lockfile — lockfile-api","text":"function provides API creating modifying renv lockfiles. can useful like programmatically generate modify lockfile – example, want update change package record existing lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile-api.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Programmatically Create and Modify a Lockfile — lockfile-api","text":"","code":"lockfile(file = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile-api.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Programmatically Create and Modify a Lockfile — lockfile-api","text":"file path existing lockfile. lockfile provided, new one created based current project context. want create blank lockfile, use file = NA instead. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile-api.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Programmatically Create and Modify a Lockfile — lockfile-api","text":"","code":"if (FALSE) { # \\dontrun{ lock <- lockfile(\"renv.lock\") # set the repositories for a lockfile lock$repos(CRAN = \"https://cran.r-project.org\") # depend on digest 0.6.22 lock$add(digest = \"digest@0.6.22\") # write to file lock$write(\"renv.lock\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate an renv lockfile against a schema — lockfile_validate","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"renv::lockfile_validate() can used validate renv.lock default custom schema. can used automate checks, check obvious errors, ensure custom fields add fit specific needs.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"","code":"lockfile_validate( project = NULL, lockfile = NULL, schema = NULL, greedy = FALSE, error = FALSE, verbose = FALSE, strict = FALSE )"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. lockfile Contents lockfile, filename containing one. provided, defaults project's lockfile. schema Contents renv schema, filename containing schema. provided, renv's default schema used. greedy Boolean. Continue first error? error Boolean. Throw error parse failure? verbose Boolean. TRUE, attribute errors list validation failures data.frame. strict Boolean. Set whether schema parsed strictly . strict mode schemas error \"prevent unexpected behaviours silently ignored mistakes user schema\". example error encounters unknown formats unknown keywords. See https://ajv.js.org/strict-mode.html details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"Boolean. TRUE validation passes. FALSE validation fails.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"See JSON Schema docs information JSON schemas, use validation, write schema. renv::lockfile_validate() wraps ROpenSci's jsonvalidate package, passing many parameters package's json_validate() function. Use ?jsonvalidate::json_validate information.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfile_validate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate an renv lockfile against a schema — lockfile_validate","text":"","code":"if (FALSE) { # \\dontrun{ # validate the project's lockfile renv::lockfile_validate() # validate the project's lockfile using a non-default schema renv::lockfile_validate(schema = \"/path/to/your/custom/schema.json\") # validate a lockfile using its path renv::lockfile_validate(lockfile = \"/path/to/your/renv.lock\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Lockfiles — lockfiles","title":"Lockfiles — lockfiles","text":"lockfile records state project point time.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lockfiles — lockfiles","text":"","code":"lockfile_create( type = settings$snapshot.type(project = project), libpaths = .libPaths(), packages = NULL, exclude = NULL, prompt = interactive(), force = FALSE, ..., project = NULL ) lockfile_read(file = NULL, ..., project = NULL) lockfile_write(lockfile, file = NULL, ..., project = NULL) lockfile_modify( lockfile = NULL, ..., remotes = NULL, repos = NULL, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lockfiles — lockfiles","text":"type type snapshot perform: \"implicit\", (default), uses packages captured dependencies(). \"explicit\" uses packages recorded DESCRIPTION. \"\" uses packages project library. \"custom\" uses custom filter. See Snapshot type details. libpaths library paths used generating lockfile. packages vector packages included lockfile. NULL (default), packages relevant type snapshot performed included. set, type argument ignored. Recursive dependencies specified packages added lockfile well. exclude vector packages explicitly excluded lockfile. Note transitive package dependencies always included, avoid potentially creating incomplete / non-functional lockfile. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. force Boolean; force generation lockfile even pre-flight validation checks failed? ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. project project directory. NULL, active project used. project currently active, current working directory used instead. file file path, R connection. lockfile renv lockfile; typically created either lockfile_create() lockfile_read(). remotes R vector remote specifications. repos named vector, mapping R repository names URLs.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lockfiles — lockfiles","text":"lockfile captures state project's library point time. particular, package names, versions, sources (known) recorded lockfile. Projects can restored lockfile using restore() function. implies reinstalling packages project's private library, encoded within lockfile. lockfiles normally generated used snapshot() / restore(), can also edited hand desired. Lockfiles written .json, allow easy consumption tools. example lockfile follows: sections used within lockfile described next.","code":"{ \"R\": { \"Version\": \"3.6.1\", \"Repositories\": [ { \"Name\": \"CRAN\", \"URL\": \"https://cloud.r-project.org\" } ] }, \"Packages\": { \"markdown\": { \"Package\": \"markdown\", \"Version\": \"1.0\", \"Source\": \"Repository\", \"Repository\": \"CRAN\", \"Hash\": \"4584a57f565dd7987d59dda3a02cfb41\" }, \"mime\": { \"Package\": \"mime\", \"Version\": \"0.7\", \"Source\": \"Repository\", \"Repository\": \"CRAN\", \"Hash\": \"908d95ccbfd1dd274073ef07a7c93934\" } } }"},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"renv","dir":"Reference","previous_headings":"","what":"renv","title":"Lockfiles — lockfiles","text":"Information version renv used manage project.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"r","dir":"Reference","previous_headings":"","what":"R","title":"Lockfiles — lockfiles","text":"Properties related version R associated project.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"packages","dir":"Reference","previous_headings":"","what":"Packages","title":"Lockfiles — lockfiles","text":"R package records, capturing packages used required project time lockfile generated. Additional remote fields, describing package can retrieved corresponding source, also included appropriate (e.g. packages installed GitHub).","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"python","dir":"Reference","previous_headings":"","what":"Python","title":"Lockfiles — lockfiles","text":"Metadata related version Python used project (). Note Name field may empty. case, project-local Python environment used instead (directly using system copy Python).","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/lockfiles.html","id":"caveats","dir":"Reference","previous_headings":"","what":"Caveats","title":"Lockfiles — lockfiles","text":"functions primarily intended expert users – cases, snapshot() restore() primariy tools need creating using lockfiles.","code":""},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Migrate a project from packrat to renv — migrate","title":"Migrate a project from packrat to renv — migrate","text":"Migrate project's infrastructure packrat renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Migrate a project from packrat to renv — migrate","text":"","code":"migrate( project = NULL, packrat = c(\"lockfile\", \"sources\", \"library\", \"options\", \"cache\") )"},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Migrate a project from packrat to renv — migrate","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. packrat Components Packrat project migrate. See default argument list components Packrat project can migrated. Select subset components migration appropriate.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Migrate a project from packrat to renv — migrate","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":"migration","dir":"Reference","previous_headings":"","what":"Migration","title":"Migrate a project from packrat to renv — migrate","text":"migrating Packrat projects renv, set components migrated can customized using packrat argument. set components can migrated follows:","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/migrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Migrate a project from packrat to renv — migrate","text":"","code":"if (FALSE) { # \\dontrun{ # migrate Packrat project infrastructure to renv renv::migrate() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify a Lockfile — modify","title":"Modify a Lockfile — modify","text":"Modify project's lockfile, either interactively non-interactively.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify a Lockfile — modify","text":"","code":"modify(project = NULL, changes = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify a Lockfile — modify","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. changes list changes merged lockfile. NULL (default), lockfile instead opened interactive editing.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modify a Lockfile — modify","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Modify a Lockfile — modify","text":"edit, lockfile edited associated active project, state-related changes (e.g. R repositories) updated current session.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/modify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modify a Lockfile — modify","text":"","code":"if (FALSE) { # \\dontrun{ # modify an existing lockfile if (interactive()) renv::modify() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Path for storing global state — paths","title":"Path for storing global state — paths","text":"default, renv stores global state following OS-specific folders: desired, path can customized setting RENV_PATHS_ROOT environment variable. can useful like, example, multiple users able share single global cache.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Path for storing global state — paths","text":"","code":"paths"},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"customising-individual-paths","dir":"Reference","previous_headings":"","what":"Customising individual paths","title":"Path for storing global state — paths","text":"various state sub-directories can also individually adjusted, desired (e.g. prefer keep cache package installations separate volume). various environment variables can set enumerated : (want settings persist project, recommended add appropriate R startup file. example, set : project-local .Renviron, user-level .Renviron, site-wide file file.path(R.home(\"etc\"), \"Renviron.site\"). See Startup details). Note renv append platform-specific version-specific entries set paths appropriate. example, set: directory used cache still depend renv cache version (e.g. v2), R version (e.g. 3.5) platform (e.g. x86_64-pc-linux-gnu). example: ensures can set single RENV_PATHS_CACHE environment variable globally without worry may cause collisions errors multiple versions R needed interact cache. reproducibility project desired particular machine, highly recommended renv cache installed packages + binary packages backed persisted, packages can easily restored future – installation packages source can often arduous.","code":"Sys.setenv(RENV_PATHS_CACHE = \"/mnt/shared/renv/cache\") /mnt/shared/renv/cache/v2/R-3.5/x86_64-pc-linux-gnu"},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"sharing-state-across-operating-systems","dir":"Reference","previous_headings":"","what":"Sharing state across operating systems","title":"Path for storing global state — paths","text":"need share cache multiple different Linux operating systems, may want set RENV_PATHS_PREFIX environment variable help disambiguate paths used Linux. example, setting RENV_PATHS_PREFIX = \"ubuntu-bionic\" instruct renv construct cache path like: required, strongly recommended environment variable set R installation's Renviron.site file, typically located file.path(R.home(\"etc\"), \"Renviron.site\"), can active R sessions launched machine. Starting renv 0.13.0, can also instruct renv auto-generate OS-specific component include part library cache paths, setting environment variable: prefix constructed based fields within system's /etc/os-release file. Note default behavior renv 1.0.6 using R 4.4.0 later.","code":"/mnt/shared/renv/cache/v2/ubuntu-bionic/R-3.5/x86_64-pc-linux-gnu RENV_PATHS_PREFIX_AUTO = TRUE"},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"package-cellar","dir":"Reference","previous_headings":"","what":"Package cellar","title":"Path for storing global state — paths","text":"project depends one R packages available remote location, can still provide locally-available tarball renv use restore. default, packages made available folder specified RENV_PATHS_CELLAR environment variable. package sources placed file one locations: ${RENV_PATHS_CELLAR}/_. ${RENV_PATHS_CELLAR}//_. /renv/cellar/_. /renv/cellar//_. . .tar.gz source packages, .tgz binaries macOS .zip binaries Windows. restore(), renv search cellar compatible package, prefer installation copy package appropriate.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"older-versions","dir":"Reference","previous_headings":"","what":"Older versions","title":"Path for storing global state — paths","text":"Older version renv used different default cache location. cache locations : renv root directory already created one old locations, still used. change made comply CRAN policy requirements R packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/paths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Path for storing global state — paths","text":"","code":"# get the path to the project library path <- renv::paths$library()"},{"path":"https://rstudio.github.io/renv/dev/reference/project.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the active project — project","title":"Retrieve the active project — project","text":"Retrieve path active project ().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the active project — project","text":"","code":"project(default = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the active project — project","text":"default value return project currently active. Defaults NULL.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the active project — project","text":"active project directory, length-one character vector.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve the active project — project","text":"","code":"if (FALSE) { # \\dontrun{ # get the currently-active renv project renv::project() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":null,"dir":"Reference","previous_headings":"","what":"Purge packages from the cache — purge","title":"Purge packages from the cache — purge","text":"Purge packages cache. can useful package previously installed cache become corrupted unusable, needs reinstalled.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Purge packages from the cache — purge","text":"","code":"purge(package, ..., version = NULL, hash = NULL, prompt = interactive())"},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Purge packages from the cache — purge","text":"package single package removed cache. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. version package version removed. NULL, versions requested package removed. hash specific hashes removed. NULL, hashes associated particular package's version removed. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Purge packages from the cache — purge","text":"set packages removed renv global cache, character vector file paths.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Purge packages from the cache — purge","text":"purge() inherently destructive option. removes packages cache, project symlinked package project library find package now unavailable. projects hence need reinstall purged packages. Take heed case looking purge cache package difficult install, original sources package longer available!","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/purge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Purge packages from the cache — purge","text":"","code":"if (FALSE) { # \\dontrun{ # remove all versions of 'digest' from the cache renv::purge(\"digest\") # remove only a particular version of 'digest' from the cache renv::purge(\"digest\", version = \"0.6.19\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/rebuild.html","id":null,"dir":"Reference","previous_headings":"","what":"Rebuild the packages in your project library — rebuild","title":"Rebuild the packages in your project library — rebuild","text":"Rebuild reinstall packages library. can useful diagnostic tool – example, find one packages fail load, want ensure starting clean slate.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/rebuild.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rebuild the packages in your project library — rebuild","text":"","code":"rebuild( packages = NULL, recursive = TRUE, ..., type = NULL, prompt = interactive(), library = NULL, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/rebuild.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rebuild the packages in your project library — rebuild","text":"packages package(s) rebuilt. NULL, packages library reinstalled. recursive Boolean; dependencies packages rebuilt recursively? Defaults TRUE. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. type type package install (\"source\" \"binary\"). Defaults value getOption(\"pkgType\"). prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. library R library used. NULL, active project library used instead. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/rebuild.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rebuild the packages in your project library — rebuild","text":"named list package records installed renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/rebuild.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rebuild the packages in your project library — rebuild","text":"","code":"if (FALSE) { # \\dontrun{ # rebuild the 'dplyr' package + all of its dependencies renv::rebuild(\"dplyr\", recursive = TRUE) # rebuild only 'dplyr' renv::rebuild(\"dplyr\", recursive = FALSE) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":null,"dir":"Reference","previous_headings":"","what":"Update package records in a lockfile — record","title":"Update package records in a lockfile — record","text":"Use record() record new entry within existing renv lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update package records in a lockfile — record","text":"","code":"record(records, lockfile = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update package records in a lockfile — record","text":"records list named records, mapping package names definition source. See Records details. lockfile Path lockfile. NULL (default), renv.lock located root current project used. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update package records in a lockfile — record","text":"function can useful need change one package records within renv lockfile – example, recorded package restored particular environment, know suitable alternative.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":"records","dir":"Reference","previous_headings":"","what":"Records","title":"Update package records in a lockfile — record","text":"Records can provided either using remotes short-hand syntax, using R list entries record within lockfile. See ?lockfiles information structure package record.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/record.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update package records in a lockfile — record","text":"","code":"if (FALSE) { # \\dontrun{ # use digest 0.6.22 from package repositories -- different ways # of specifying the remote. use whichever is most natural renv::record(\"digest@0.6.22\") renv::record(list(digest = \"0.6.22\")) renv::record(list(digest = \"digest@0.6.22\")) # alternatively, provide a full record as a list digest_record <- list( Package = \"digest\", Version = \"0.6.22\", Source = \"Repository\", Repository = \"CRAN\" ) renv::record(list(digest = digest_record)) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/refresh.html","id":null,"dir":"Reference","previous_headings":"","what":"Refresh the local cache of available packages — refresh","title":"Refresh the local cache of available packages — refresh","text":"Query active R package repositories available packages, update -memory cache packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/refresh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Refresh the local cache of available packages — refresh","text":"","code":"refresh()"},{"path":"https://rstudio.github.io/renv/dev/reference/refresh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Refresh the local cache of available packages — refresh","text":"list package databases, invisibly – one repository currently active R session. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/refresh.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Refresh the local cache of available packages — refresh","text":"Note R also maintains -disk cache available packages, used available.packages(). Calling refresh() force update types caches. renv prefers using -memory cache occasion temporary directory can slow access (e.g. mounted network filesystem).","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/refresh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Refresh the local cache of available packages — refresh","text":"","code":"if (FALSE) { # \\dontrun{ # check available packages db <- available.packages() # wait some time (suppose packages are uploaded / changed in this time) Sys.sleep(5) # refresh the local available packages database # (the old locally cached db will be removed) db <- renv::refresh() } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/rehash.html","id":null,"dir":"Reference","previous_headings":"","what":"Re-hash packages in the renv cache — rehash","title":"Re-hash packages in the renv cache — rehash","text":"Re-hash packages renv cache, ensuring previously-cached packages copied new cache location appropriate version renv. can useful cache scheme changed new version renv, like preserve previously-cached packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/rehash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Re-hash packages in the renv cache — rehash","text":"","code":"rehash(prompt = interactive(), ...)"},{"path":"https://rstudio.github.io/renv/dev/reference/rehash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Re-hash packages in the renv cache — rehash","text":"prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/rehash.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Re-hash packages in the renv cache — rehash","text":"packages re-hashed retain links location newly-hashed package, ensuring prior installations renv can still function expected.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remote.html","id":null,"dir":"Reference","previous_headings":"","what":"Resolve a Remote — remote","title":"Resolve a Remote — remote","text":"Given remote specification, resolve renv package record can used download installation (e.g. install).","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Resolve a Remote — remote","text":"","code":"remote(spec)"},{"path":"https://rstudio.github.io/renv/dev/reference/remote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Resolve a Remote — remote","text":"spec remote specification. string, conforming Remotes specification defined https://remotes.r-lib.org/articles/dependencies.html.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remove.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove packages — remove","title":"Remove packages — remove","text":"Remove (uninstall) R packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remove.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove packages — remove","text":"","code":"remove(packages, ..., library = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/remove.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove packages — remove","text":"packages character vector R packages remove. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. library library packages removed. NULL, active library (, first entry reported .libPaths()) used instead. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remove.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove packages — remove","text":"vector package records, describing packages () successfully removed.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/remove.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove packages — remove","text":"","code":"if (FALSE) { # \\dontrun{ # disable automatic snapshots auto.snapshot <- getOption(\"renv.config.auto.snapshot\") options(renv.config.auto.snapshot = FALSE) # initialize a new project (with an empty R library) renv::init(bare = TRUE) # install digest 0.6.19 renv::install(\"digest@0.6.19\") # save library state to lockfile renv::snapshot() # remove digest from library renv::remove(\"digest\") # check library status renv::status() # restore lockfile, thereby reinstalling digest 0.6.19 renv::restore() # restore automatic snapshots options(renv.config.auto.snapshot = auto.snapshot) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/renv-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Project-local Environments for R — renv-package","title":"Project-local Environments for R — renv-package","text":"Project-local environments R.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/renv-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Project-local Environments for R — renv-package","text":"can use renv construct isolated, project-local R libraries. project using renv share package installations global cache packages, helping avoid wasting disk space multiple installations package might otherwise shared across projects.","code":""},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/reference/renv-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Project-local Environments for R — renv-package","text":"Maintainer: Kevin Ushey kevin@rstudio.com (ORCID) Authors: Hadley Wickham hadley@rstudio.com (ORCID) contributors: Posit Software, PBC [copyright holder, funder]","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/renv_lockfile_from_manifest.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate renv.lock from an RStudio Connect manifest.json — renv_lockfile_from_manifest","title":"Generate renv.lock from an RStudio Connect manifest.json — renv_lockfile_from_manifest","text":"Use renv_lockfile_from_manifest() convert manifest.json file RStudio Connect content bundle renv.lock lockfile. function can useful need recreate package environment piece content deployed RStudio Connect. content bundle contains manifest.json file used recreate package environment. function let convert manifest file renv.lock file. Run renv::restore() converted file restore package environment.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/renv_lockfile_from_manifest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate renv.lock from an RStudio Connect manifest.json — renv_lockfile_from_manifest","text":"","code":"renv_lockfile_from_manifest( manifest = \"manifest.json\", lockfile = NA, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/renv_lockfile_from_manifest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate renv.lock from an RStudio Connect manifest.json — renv_lockfile_from_manifest","text":"manifest path manifest.json file. lockfile path lockfile generated / updated. NA (default), generated lockfile returned R object; otherwise, lockfile written path specified lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/renv_lockfile_from_manifest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate renv.lock from an RStudio Connect manifest.json — renv_lockfile_from_manifest","text":"renv lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/repair.html","id":null,"dir":"Reference","previous_headings":"","what":"Repair a project — repair","title":"Repair a project — repair","text":"Use repair() recover common issues can occur project. Currently, two operations performed:","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/repair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Repair a project — repair","text":"","code":"repair(library = NULL, lockfile = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/repair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Repair a project — repair","text":"library R library used. NULL, active project library used instead. lockfile path lockfile (). available, renv use lockfile attempting infer remote associated inaccessible version missing package. NULL (default), project lockfile used. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/repair.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Repair a project — repair","text":"Packages broken symlinks cache re-installed. Packages installed sources, appear remote source (e.g. GitHub), DESCRIPTION files updated record remote source explicitly.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":null,"dir":"Reference","previous_headings":"","what":"Restore project library from a lockfile — restore","title":"Restore project library from a lockfile — restore","text":"Restore project's dependencies lockfile, previously generated snapshot().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Restore project library from a lockfile — restore","text":"","code":"restore( project = NULL, ..., library = NULL, lockfile = NULL, packages = NULL, exclude = NULL, rebuild = FALSE, repos = NULL, clean = FALSE, transactional = NULL, prompt = interactive() )"},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Restore project library from a lockfile — restore","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. library library paths used restore. lockfile Path lockfile. NULL (default), renv.lock located root current project used. packages subset packages recorded lockfile restore. NULL (default), packages available lockfile restored. required recursive dependencies requested packages restored well. exclude subset packages excluded restore. can useful like restore subset packages lockfile. Note attempt exclude package required recursive dependency another package, request ignored. rebuild Force packages rebuilt, thereby bypassing installed versions package available cache? can either boolean (indicating installed packages rebuilt), vector package names indicating packages rebuilt. repos repositories use restoring packages installed CRAN CRAN-like repository. default, repositories recorded lockfile , ensuring (e.g.) CRAN packages re-installed CRAN mirror. Use repos = getOption(\"repos\") override repositories set current session, see repos.override option config alternate way override. clean Boolean; remove packages recorded lockfile target library? Use clean = TRUE like library state exactly reflect lockfile contents restore(). transactional Whether use 'transactional' restore. See Transactional Restore details. NULL (default), value install.transactional config option used. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Restore project library from a lockfile — restore","text":"named list package records installed renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Restore project library from a lockfile — restore","text":"renv::restore() compares packages recorded lockfile packages installed project library. differences resolves installing lockfile-recorded package project library. clean = TRUE, restore() additionally delete packages project library appear lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"transactional-restore","dir":"Reference","previous_headings":"","what":"Transactional Restore","title":"Restore project library from a lockfile — restore","text":"default, renv::restore() perform 'transactional' restore, wherein project library mutated packages within lockfile successfully restored. intention prevent private library entering inconsistent state, subset packages install successfully subset packages . renv::restore(transactional = FALSE) can useful attempting restore packages lockfile, like update change certain packages piece-meal fail install. term 'transactional' borrows parlance 'database transaction', failure intermediate step implies whole transaction rolled back, state database transaction initiated can preserved. See https://en.wikipedia.org/wiki/Database_transaction details.","code":""},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/reference/restore.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Restore project library from a lockfile — restore","text":"","code":"if (FALSE) { # \\dontrun{ # disable automatic snapshots auto.snapshot <- getOption(\"renv.config.auto.snapshot\") options(renv.config.auto.snapshot = FALSE) # initialize a new project (with an empty R library) renv::init(bare = TRUE) # install digest 0.6.19 renv::install(\"digest@0.6.19\") # save library state to lockfile renv::snapshot() # remove digest from library renv::remove(\"digest\") # check library status renv::status() # restore lockfile, thereby reinstalling digest 0.6.19 renv::restore() # restore automatic snapshots options(renv.config.auto.snapshot = auto.snapshot) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve packages — retrieve","title":"Retrieve packages — retrieve","text":"Retrieve (download) one packages external sources. Using renv::retrieve() can useful CI / CD workflows, might want download packages listed lockfile later invoking restore(). Packages downloaded internal path within renv's local state directories – see paths details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve packages — retrieve","text":"","code":"retrieve(packages = NULL, ..., lockfile = NULL, destdir = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve packages — retrieve","text":"packages Either NULL (default) install packages required project, character vector packages install. renv supports subset remotes syntax used package installation, e.g: pkg: install latest version pkg CRAN. pkg@version: install specified version pkg CRAN. username/repo: install package GitHub bioc::pkg: install pkg Bioconductor. See https://remotes.r-lib.org/articles/dependencies.html examples details. renv deviates remotes spec one important way: subdirectories separated main repository specification :, /. install subdir subdirectory GitHub package username/repo use \"username/repo:subdir. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. lockfile path renv lockfile. set, renv retrieve packages defined within lockfile. packages also non-NULL, packages retrieved. destdir directory packages downloaded. NULL (default), default internal storage locations (normally used e.g. install() restore()) used. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve packages — retrieve","text":"named vector, mapping package names paths packages downloaded.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve packages — retrieve","text":"destdir NULL requested package already available within renv cache, renv return path package directory cache.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/retrieve.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve packages — retrieve","text":"","code":"if (FALSE) { # \\dontrun{ # retrieve package + versions as defined in the lockfile # normally used as a pre-flight step to renv::restore() renv::retrieve() # download one or more packages locally renv::retrieve(\"rlang\", destdir = \".\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/run.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a script — run","title":"Run a script — run","text":"Run R script, context project using renv. script run within R sub-process.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/run.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a script — run","text":"","code":"run(script, ..., job = NULL, name = NULL, project = NULL)"},{"path":"https://rstudio.github.io/renv/dev/reference/run.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a script — run","text":"script path R script. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. job Run requested script RStudio job? Requires recent version RStudio rstudioapi packages. NULL, script run job possible, regular R process launched system2() . name name associate job, scripts run job. project path renv project. project loaded requested script executed. NULL (default), renv automatically determine project root associated script possible.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/run.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a script — run","text":"project directory, invisibly. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/sandbox.html","id":null,"dir":"Reference","previous_headings":"","what":"The default library sandbox — sandbox","title":"The default library sandbox — sandbox","text":"R installation can three types library paths available user: user library, R packages downloaded installed current user installed. library path visible specific user. site library, R packages maintained administrators system installed. library path, exists, visible users system. default library, R packages distributed R installed. library path visible users system. Normally, -called \"base\" \"recommended\" packages installed default library. (can get list packages installed.packages(priority = c(\"base\", \"recommended\"))). However, possible users administrators install packages default library, filesystem permissions permit . (, example, default behavior macOS.) site default libraries visible users, accessible renv projects can potentially break isolation – , package updated default library, update visible R projects system. help defend , renv uses something called \"sandbox\" isolate renv projects non-\"base\" packages installed default library. renv project loaded, renv : Create new, empty library path (called \"sandbox\"), Link \"base\" \"recommended\" packages default library sandbox, Mark sandbox read-, users unable install packages library, Instruct R session use \"sandbox\" default library. process mostly transparent user. However, sandbox read-, later need remove sandbox, need reset file permissions manually; example, renv::sandbox$unlock(). prefer keep sandbox unlocked, can also set: appropriate startup .Renviron Renviron.site file. sandbox can also disabled entirely : sandbox library path can also configured using RENV_PATHS_SANDBOX environment variable: see paths details.","code":"RENV_SANDBOX_LOCKING_ENABLED = FALSE RENV_CONFIG_SANDBOX_ENABLED = FALSE"},{"path":"https://rstudio.github.io/renv/dev/reference/sandbox.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The default library sandbox — sandbox","text":"","code":"sandbox"},{"path":"https://rstudio.github.io/renv/dev/reference/scaffold.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate project infrastructure — scaffold","title":"Generate project infrastructure — scaffold","text":"Create renv project infrastructure. : Create project library, renv/library. Install renv project library. Update project .Rprofile call source(\"renv/activate.R\") renv automatically loaded new R sessions launched project. Create renv/.gitignore, tells git ignore project library. Create .Rbuildignore, project also package. tells R CMD build ignore renv infrastructure, Write (bare) lockfile, renv.lock.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/scaffold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate project infrastructure — scaffold","text":"","code":"scaffold( project = NULL, version = NULL, repos = getOption(\"repos\"), settings = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/scaffold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate project infrastructure — scaffold","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. version version renv associate project. default, version renv currently installed used. repos R repositories associate project. settings list renv settings, applied project creation. map setting names desired values. See settings details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/scaffold.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate project infrastructure — scaffold","text":"","code":"if (FALSE) { # \\dontrun{ # create scaffolding with 'devtools' ignored renv::scaffold(settings = list(ignored.packages = \"devtools\")) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":null,"dir":"Reference","previous_headings":"","what":"Project settings — settings","title":"Project settings — settings","text":"Define project-local settings can used adjust behavior renv particular project. Get current value setting (e.g.) settings$snapshot.type() Set current value setting (e.g.) settings$snapshot.type(\"explicit\"). Settings automatically persisted across project sessions writing renv/settings.json. can also edit file hand, need restart session changes take effect.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"bioconductor-version","dir":"Reference","previous_headings":"","what":"bioconductor.version","title":"Project settings — settings","text":"Bioconductor version used project. Use like lock version Bioconductor used per-project basis. unset, renv try infer appropriate Bioconductor release using BiocVersion package installed; , renv uses BiocManager::version() infer appropriate Bioconductor version.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"external-libraries","dir":"Reference","previous_headings":"","what":"external.libraries","title":"Project settings — settings","text":"vector library paths, used addition project's private library. can useful package available use system library, reason renv able install package (e.g. sources binaries package publicly available, unable orchestrate pre-requisites installing packages source machine).","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"ignored-packages","dir":"Reference","previous_headings":"","what":"ignored.packages","title":"Project settings — settings","text":"vector packages, ignored attempting snapshot project's private library. Note package already added lockfile, entry lockfile ignored.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"package-dependency-fields","dir":"Reference","previous_headings":"","what":"package.dependency.fields","title":"Project settings — settings","text":"explicitly installing package install(), fields used determine packages dependencies? default uses Imports, Depends LinkingTo fields, also want install Suggests dependencies package, can set c(\"Imports\", \"Depends\", \"LinkingTo\", \"Suggests\").","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"ppm-enabled","dir":"Reference","previous_headings":"","what":"ppm.enabled","title":"Project settings — settings","text":"Enable Posit Package Manager integration project? TRUE, renv attempt transform repository URLs used PPM binary URLs appropriate current Linux platform. Set FALSE like continue using source-PPM URLs, find renv improperly transforming repository URLs. can still set use PPM repositories option disabled; controls whether renv tries transform source repository URLs binary URLs behalf.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"ppm-ignored-urls","dir":"Reference","previous_headings":"","what":"ppm.ignored.urls","title":"Project settings — settings","text":"Posit Package Manager integration enabled, renv attempt transform source repository URLs binary repository URLs. setting can used like avoid transformation subset repository URLs.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"r-version","dir":"Reference","previous_headings":"","what":"r.version","title":"Project settings — settings","text":"version R encode within lockfile. can set project-specific option like allow multiple users use renv project different versions R. renv still warn user major + minor version R used project match encoded lockfile.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"snapshot-type","dir":"Reference","previous_headings":"","what":"snapshot.type","title":"Project settings — settings","text":"type snapshot perform default. See snapshot details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"use-cache","dir":"Reference","previous_headings":"","what":"use.cache","title":"Project settings — settings","text":"Enable renv package cache project. active, renv install packages global cache, link packages cache renv projects appropriate. can greatly save disk space install time R packages used across multiple projects environment.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"vcs-manage-ignores","dir":"Reference","previous_headings":"","what":"vcs.manage.ignores","title":"Project settings — settings","text":"renv attempt manage version control system's ignore files (e.g. .gitignore) within project? Set FALSE prefer take control. Note setting enabled, need manually ensure internal data project's renv/ folder explicitly ignored.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"vcs-ignore-cellar","dir":"Reference","previous_headings":"","what":"vcs.ignore.cellar","title":"Project settings — settings","text":"Set whether packages within project-local package cellar excluded version control. See vignette(\"cellar\", package = \"renv\") information.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"vcs-ignore-library","dir":"Reference","previous_headings":"","what":"vcs.ignore.library","title":"Project settings — settings","text":"Set whether renv project library excluded version control.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"vcs-ignore-local","dir":"Reference","previous_headings":"","what":"vcs.ignore.local","title":"Project settings — settings","text":"Set whether renv project-specific local sources excluded version control.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project settings — settings","text":"","code":"settings"},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Project settings — settings","text":"named list renv settings.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"defaults","dir":"Reference","previous_headings":"","what":"Defaults","title":"Project settings — settings","text":"can change default values settings newly-created renv projects setting R options renv.settings renv.settings.. example: renv.settings renv.settings. options set particular key, option associated renv.settings. used instead. recommend setting appropriate startup profile, e.g. ~/.Rprofile similar.","code":"options(renv.settings = list(snapshot.type = \"all\")) options(renv.settings.snapshot.type = \"all\")"},{"path":"https://rstudio.github.io/renv/dev/reference/settings.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project settings — settings","text":"","code":"if (FALSE) { # \\dontrun{ # view currently-ignored packaged renv::settings$ignored.packages() # ignore a set of packages renv::settings$ignored.packages(\"devtools\", persist = FALSE) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":null,"dir":"Reference","previous_headings":"","what":"Record current state of the project library in the lockfile — snapshot","title":"Record current state of the project library in the lockfile — snapshot","text":"Call renv::snapshot() update lockfile current state dependencies project library. lockfile can used later restore dependencies required. also possible call renv::snapshot() non-renv project, case record current state dependencies current library paths. makes possible restore current packages, providing lightweight portability reproducibility without isolation. want automatically snapshot change, can set config$config$auto.snapshot(TRUE), see ?config details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Record current state of the project library in the lockfile — snapshot","text":"","code":"snapshot( project = NULL, ..., library = NULL, lockfile = paths$lockfile(project = project), type = settings$snapshot.type(project = project), dev = FALSE, repos = getOption(\"repos\"), packages = NULL, exclude = NULL, prompt = interactive(), update = FALSE, force = FALSE, reprex = FALSE )"},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Record current state of the project library in the lockfile — snapshot","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. library R libraries snapshot. NULL, active R libraries (reported .libPaths()) used. lockfile location generated lockfile written. default, lockfile written file called renv.lock project directory. NULL, lockfile (R object) returned directly instead. type type snapshot perform: \"implicit\", (default), uses packages captured dependencies(). \"explicit\" uses packages recorded DESCRIPTION. \"\" uses packages project library. \"custom\" uses custom filter. See Snapshot type details. dev Boolean; include development dependencies? packages typically required developing project, running (.e. want installed humans working project computers deploying ). Development dependencies include packages listed Suggests field DESCRIPTION found project root, roxygen2 devtools use implied project metadata. also include packages used ~/.Rprofile config$user.profile() TRUE. repos R repositories recorded lockfile. Defaults currently active package repositories, retrieved getOption(\"repos\"). packages vector packages included lockfile. NULL (default), packages relevant type snapshot performed included. set, type argument ignored. Recursive dependencies specified packages added lockfile well. exclude vector packages explicitly excluded lockfile. Note transitive package dependencies always included, avoid potentially creating incomplete / non-functional lockfile. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. update Boolean; lockfile already exists, attempt update lockfile without removing prior package records. force Boolean; force generation lockfile even pre-flight validation checks failed? reprex Boolean; generate output appropriate embedding lockfile part reprex?","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Record current state of the project library in the lockfile — snapshot","text":"generated lockfile, R object (invisibly). Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":"snapshot-types","dir":"Reference","previous_headings":"","what":"Snapshot types","title":"Record current state of the project library in the lockfile — snapshot","text":"Depending prefer manage dependencies, might prefer selecting different snapshot mode. modes available follows: \"implicit\" (default) Capture packages appear used project, determined renv::dependencies(). ensures packages actually required project enter lockfile; downside might slow project contains large number files. speed becomes issue, might consider using .renvignore files limit files renv uses dependency discovery, switching explicit mode, described next. \"explicit\" capture packages explicitly listed project DESCRIPTION file. workflow recommended users wish manage project's R package dependencies directly. \"\" Capture packages within active R libraries lockfile. quickest simplest method, may lead undesired packages (e.g. development dependencies) entering lockfile. \"custom\" Like \"implicit\", use custom user-defined filter instead. filter specified R option renv.snapshot.filter, either character vector naming function (e.g. \"package::method\"), function . function accept one argument (project directory), return vector package names include lockfile. can change snapshot type current project settings(). example, following code switch using \"explicit\" snapshots: packages argument set, type ignored, instead requested set packages, recursive dependencies, written lockfile.","code":"renv::settings$snapshot.type(\"explicit\")"},{"path":[]},{"path":"https://rstudio.github.io/renv/dev/reference/snapshot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Record current state of the project library in the lockfile — snapshot","text":"","code":"if (FALSE) { # \\dontrun{ # disable automatic snapshots auto.snapshot <- getOption(\"renv.config.auto.snapshot\") options(renv.config.auto.snapshot = FALSE) # initialize a new project (with an empty R library) renv::init(bare = TRUE) # install digest 0.6.19 renv::install(\"digest@0.6.19\") # save library state to lockfile renv::snapshot() # remove digest from library renv::remove(\"digest\") # check library status renv::status() # restore lockfile, thereby reinstalling digest 0.6.19 renv::restore() # restore automatic snapshots options(renv.config.auto.snapshot = auto.snapshot) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":null,"dir":"Reference","previous_headings":"","what":"Report inconsistencies between lockfile, library, and dependencies — status","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"renv::status() reports issues caused inconsistencies across project lockfile, library, dependencies(). general, strive ensure status() reports issues, maximizes chances successfully restore()ing project future another machine. renv::load() report issues detected starting renv project; recommend resolving issues work project. See headings specific advice resolving issues revealed status().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"","code":"status( project = NULL, ..., library = NULL, lockfile = NULL, sources = TRUE, cache = FALSE, dev = FALSE )"},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. library library paths. default, library paths associated requested project used. lockfile Path lockfile. NULL (default), renv.lock located root current project used. sources Boolean; check recorded packages known installation source? package unknown source, renv may unable restore . cache Boolean; perform diagnostics global package cache? TRUE, renv validate packages installed cache installed expected + proper locations, validate hashes used storage locations. dev Boolean; include development dependencies? packages typically required developing project, running (.e. want installed humans working project computers deploying ). Development dependencies include packages listed Suggests field DESCRIPTION found project root, roxygen2 devtools use implied project metadata. also include packages used ~/.Rprofile config$user.profile() TRUE.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"function normally called side effects, invisibly returns list containing following components: library: packages library. lockfile: packages lockfile. synchronized: library lockfile sync?","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"missing-packages","dir":"Reference","previous_headings":"","what":"Missing packages","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"status() first checks packages used project installed. must done first packages missing tell sure package used; might dependency know . resolve installation issues, need run status() reveal next set potential problems. four possibilities uninstalled package: used recorded, call renv::restore() install version specified lockfile. used recorded, call renv::install() install CRAN elsewhere. used recorded, call renv::snapshot() remove lockfile. used recorded, nothing . common state use small fraction available packages one project. multiple packages inconsistent state, recommend renv::restore(), renv::install(), renv::snapshot(), also suggests running status frequently.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"lockfile-vs-dependencies-","dir":"Reference","previous_headings":"","what":"Lockfile vs dependencies()","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"Next need ensure packages recorded lockfile used project. Fixing issues nature requires calling snapshot() four possibilities package: used recorded, ok. used recorded, call renv::snapshot() add lockfile. used recorded, call renv::snapshot() remove lockfile. used recorded, also ok, may development dependency.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"out-of-sync-sources","dir":"Reference","previous_headings":"","what":"Out-of-sync sources","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"final issue resolve inconsistencies version package recorded lockfile version installed library. fix issues need either call renv::restore() renv::snapshot(): Call renv::snapshot() project code working. implies library correct need update lockfile. Call renv::restore() project code working. probably implies wrong package versions installed need restore known good state lockfile. sure case applies, generally safer call renv::snapshot(). want rollback earlier known good status, see history() revert().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"different-r-version","dir":"Reference","previous_headings":"","what":"Different R Version","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"renv also notify version R used lockfile generated, version R currently use, match. scenario, need consider: version R recorded lockfile correct? , want ensure version R installed used working project. Otherwise, can call renv::snapshot() update version R recorded lockfile, match version R currently use. like set version R recorded lockfile independently version R currently use, can set r.version project setting – see settings details.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/status.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report inconsistencies between lockfile, library, and dependencies — status","text":"","code":"if (FALSE) { # \\dontrun{ # disable automatic snapshots auto.snapshot <- getOption(\"renv.config.auto.snapshot\") options(renv.config.auto.snapshot = FALSE) # initialize a new project (with an empty R library) renv::init(bare = TRUE) # install digest 0.6.19 renv::install(\"digest@0.6.19\") # save library state to lockfile renv::snapshot() # remove digest from library renv::remove(\"digest\") # check library status renv::status() # restore lockfile, thereby reinstalling digest 0.6.19 renv::restore() # restore automatic snapshots options(renv.config.auto.snapshot = auto.snapshot) } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/update.html","id":null,"dir":"Reference","previous_headings":"","what":"Update packages — update","title":"Update packages — update","text":"Update packages currently --date. Currently supports CRAN, Bioconductor, CRAN-like repositories, GitHub, GitLab, Git, BitBucket. Updates checked source – example, package installed GitHub, newer version available CRAN, updated version seen.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/update.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update packages — update","text":"","code":"update( packages = NULL, ..., exclude = NULL, library = NULL, type = NULL, rebuild = FALSE, check = FALSE, prompt = interactive(), lock = FALSE, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/update.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update packages — update","text":"packages character vector R packages update. NULL (default), packages (apart listed ignored.packages project setting) updated. ... Unused arguments, reserved future expansion. arguments matched ..., renv signal error. exclude set packages explicitly exclude updating. Use renv::update(exclude = <...>) update packages except specific set excluded packages. library R library used. NULL, active project library used instead. type type package install (\"source\" \"binary\"). Defaults value getOption(\"pkgType\"). rebuild Force packages rebuilt, thereby bypassing installed versions package available cache? can either boolean (indicating installed packages rebuilt), vector package names indicating packages rebuilt. check Boolean; check package updates without actually installing available updates? useful like determine updates available, without actually installing updates. prompt Boolean; prompt user taking action? backwards compatibility, confirm accepted alias prompt. lock Boolean; update renv.lock lockfile successful installation requested packages? project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/update.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update packages — update","text":"named list package records installed renv.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/update.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update packages — update","text":"","code":"if (FALSE) { # \\dontrun{ # update the 'dplyr' package renv::update(\"dplyr\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/upgrade.html","id":null,"dir":"Reference","previous_headings":"","what":"Upgrade renv — upgrade","title":"Upgrade renv — upgrade","text":"Upgrade version renv associated project, including using development version GitHub. Automatically snapshots update renv, updates activate script, restarts R. want update packages (including renv) latest CRAN versions, use update().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/upgrade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Upgrade renv — upgrade","text":"","code":"upgrade(project = NULL, version = NULL, reload = NULL, prompt = interactive())"},{"path":"https://rstudio.github.io/renv/dev/reference/upgrade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Upgrade renv — upgrade","text":"project project directory. NULL, active project used. project currently active, current working directory used instead. version version renv installed. NULL (default), latest version renv installed available CRAN (whatever active package repositories active) Alternatively, can install latest development version \"main\", specific commit SHA, e.g. \"5049cef8a\". reload Boolean; reload renv install? NULL (default), renv re-loaded updating renv active project. Since possible guarantee clean reload current session, attempt restart R session. prompt Boolean; prompt upgrade proceeding?","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/upgrade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Upgrade renv — upgrade","text":"boolean value, indicating whether requested version renv successfully installed. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/upgrade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Upgrade renv — upgrade","text":"","code":"if (FALSE) { # \\dontrun{ # upgrade to the latest version of renv renv::upgrade() # upgrade to the latest version of renv on GitHub (development version) renv::upgrade(version = \"main\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":null,"dir":"Reference","previous_headings":"","what":"Use python — use_python","title":"Use python — use_python","text":"Associate version Python project.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use python — use_python","text":"","code":"use_python( python = NULL, ..., type = c(\"auto\", \"virtualenv\", \"conda\", \"system\"), name = NULL, project = NULL )"},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use python — use_python","text":"python path version Python used project. See Finding Python details. ... Optional arguments; currently unused. type type Python environment use. \"auto\" (default), virtual environments used. name name path used associated Python environment. NULL python points Python executable living within pre-existing virtual environment, environment used. Otherwise, project-local environment created instead, using name generated associated version Python. project project directory. NULL, active project used. project currently active, current working directory used instead.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use python — use_python","text":"TRUE, indicating requested version Python successfully activated. Note function normally called side effects.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Use python — use_python","text":"Python integration active, renv : Save metadata requested version Python renv.lock – particular, Python version, Python type (\"virtualenv\", \"conda\", \"system\"), Capture set installed Python packages renv::snapshot(), Re-install set recorded Python packages renv::restore(). addition, project loaded, following actions taken: RENV_PYTHON environment variable set, indicating version Python currently active sessions, RETICULATE_PYTHON environment variable set, reticulate package can automatically use requested copy Python appropriate, requested version Python placed PATH, attempts invoke Python resolve expected version Python. can override version Python used particular project setting RENV_PYTHON environment variable; e.g. part project's .Renviron file. can useful find renv unable automatically discover compatible version Python used project.","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"finding-python","dir":"Reference","previous_headings":"","what":"Finding Python","title":"Use python — use_python","text":"interactive sessions, python = NULL, renv prompt appropriate version Python. renv search pre-defined set locations attempting find Python installations system: getOption(\"renv.python.root\"), /opt/python, /opt/local/python, ~/opt/python, /usr/local/opt (macOS Homebrew-installed copies Python), /opt/homebrew/opt (M1 macOS Homebrew-installed copies Python), ~/.pyenv/versions, Python instances available PATH. non-interactive sessions, renv first check RETICULATE_PYTHON environment variable; unset, renv look Python PATH. recommended version Python used explicitly supplied non-interactive usages use_python().","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Use python — use_python","text":"strongly recommend using Python virtual environments, reasons: something goes wrong local virtual environment, can safely delete virtual environment, re-initialize later, without worry might impact software system. choose use \"system\" installation Python, packages install upgrade visible application wants use Python installation. Using virtual environment ensures changes made isolated environment . Choosing use Anaconda likely invite extra frustration future, may required upgrade manage Anaconda installation new versions Anaconda released. addition, Anaconda installations tend work poorly software specifically installed part Anaconda installation. words, recommend selecting \"system\" \"conda\" expert Python user already accustomed managing Python / Anaconda installations .","code":""},{"path":"https://rstudio.github.io/renv/dev/reference/use_python.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use python — use_python","text":"","code":"if (FALSE) { # \\dontrun{ # use python with a project renv::use_python() # use python with a project; create the environment # within the project directory in the '.venv' folder renv::use_python(name = \".venv\") # use python with a pre-existing virtual environment located elsewhere renv::use_python(name = \"~/.virtualenvs/env\") # use virtualenv python with a project renv::use_python(type = \"virtualenv\") # use conda python with a project renv::use_python(type = \"conda\") } # }"},{"path":"https://rstudio.github.io/renv/dev/reference/vendor.html","id":null,"dir":"Reference","previous_headings":"","what":"Vendor renv in an R package — vendor","title":"Vendor renv in an R package — vendor","text":"Calling renv:::vendor() : Compile vendored copy renv inst/vendor/renv.R, Generate renv auto-loader R/renv.R. Using , projects can take dependency renv, use renv internals, CRAN-compliant way. vendoring renv, can use renv APIs package via embedded renv environment; example, call dependencies() function : aware renv internals might change future releases, need rely renv internal functions, strongly recommend testing usages functions avoid potential breakage.","code":"renv$dependencies()"},{"path":"https://rstudio.github.io/renv/dev/reference/vendor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vendor renv in an R package — vendor","text":"","code":"vendor(version = \"main\", project = getwd())"},{"path":"https://rstudio.github.io/renv/dev/reference/vendor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vendor renv in an R package — vendor","text":"version version renv vendor. renv sources pulled GitHub, version refer either commit hash branch name. project project renv vendored.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-development-version","dir":"Changelog","previous_headings":"","what":"renv (development version)","title":"renv (development version)","text":"Fixed issue renv::checkout() omitted fields lockfile records using actions = c(\"snapshot\", \"restore\"). (#1969) renv gains function renv::retrieve(), can used download packages without installing . primarily useful CI / CD scenarios, might want download packages single stage attempting install / restore . (#1965) renv now preserves Remote fields present packages installed public package repositories (e.g. https://r-universe.dev/). (#1961) Fixed issue renv::load() fail load alternate project options(renv.config.autoloader.enabled = FALSE) set. (#1959) renv now emits clickable hyperlinks runnable code snippets help, front-ends support ide:run ide:help ANSI escapes. renv::init(bioc = \"\") now prompts user interactive sessions requesting version Bioconductor compatible current version R. (#1943) renv::restore() gains transactional argument, can used control whether renv allow successfully-installed packages remain project library even package fails install later step. (#1109) renv now infers dependency xml2 package projects using testthat::JunitReporter tests. (#1936) Fixed issue renv::dependencies() emit warning attempting parse chunks using chunk options like #| eval: c(1, 2). (#1906) renv::install() now properly delegates type rebuild arguments pak options(renv.config.pak.enabled = TRUE) set. (#1924) renv now infers dependency svglite package detects calls form ggsave(filename = \"path.svg\"). (#1930) renv now supports setting GitHub authentication credentials via GITHUB_TOKEN, GITHUB_PAT, GH_TOKEN. (#1937) renv now also passes custom headers available utils::available.packages() bootstrap. (#1942) Fixed issue renv fail installation packages stored within repository sub-directories, repository also contained top-level DESCRIPTION file. (#1941) renv now normalizes lockfile entries Bioconductor packages installed via pak::pkg_install(), help prevent spurious diffs produced via renv::status(). (#1920) renv::install() now respects prompt parameter pak enabled, via options(renv.config.pak.enabled = TRUE). (#1907) Fixed issue renv’s pak integration renv install wrong version GitHub package restore options(renv.config.pak.enabled = TRUE) set. (#1883) renv longer interacts user autoloading, coincides R startup. IDE offers session init hook (RStudio ), loading deferred startup complete interaction possible. Otherwise, suggested renv actions, renv::restore(), emitted message user act . (#1879, #1915). Fixed issue installation packages local sources, via install(\"\", repos = NULL, type = \"source\"), fail. (#1880) new function, renv::lockfile_validate(), can used validate renv.lock default custom schema. (#1889)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-107","dir":"Changelog","previous_headings":"","what":"renv 1.0.7","title":"renv 1.0.7","text":"CRAN release: 2024-04-11 Fixed issue renv’s activate script failed report version conflict errors starting . (#1874)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-106","dir":"Changelog","previous_headings":"","what":"renv 1.0.6","title":"renv 1.0.6","text":"CRAN release: 2024-04-11 Fixed issue downloads fail curl >= 8.7.1. (#1869) Fixed issue renv::snapshot() properly normalize package records generated packages installed using pak package, e.g. via pak::pkg_install(\"cran::\"). Fixed issue renv incorrectly prompt user record version renv installed GitHub cases. (#1857) renv::load() now delegates base::load() detects call likely intended base::load(), renv::load() used instead (e.g. base::load() masked renv::load()). renv::update() gains lock argument, can used instruct renv automatically update lockfile requested packages updated. (#1849) Fixed issue renv fail update project autoloader calling renv::upgrade(). (#1837) Fixed issue attempts install binary packages older PPM snapshots fail. (#1839) renv now uses platform-specific prefix Linux library cache paths default R (>= 4.4.0). equivalent setting RENV_PATHS_PREFIX_AUTO = TRUE. necessary, behavior can disabled setting RENV_PATHS_PREFIX_AUTO = FALSE appropriate R startup file. (#1211)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-105","dir":"Changelog","previous_headings":"","what":"renv 1.0.5","title":"renv 1.0.5","text":"CRAN release: 2024-02-29 renv now writes .renvignore file cache directory cache appears part current project. renv now reports missing system libraries part ABI checks renv::diagnostics(). Fixed issue renv::install(lock = TRUE) produced lockfiles containing records extraneous data. (#1828)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-104","dir":"Changelog","previous_headings":"","what":"renv 1.0.4","title":"renv 1.0.4","text":"CRAN release: 2024-02-21 renv::install() gains lock argument. TRUE, project lockfile updated requested packages successfully installed. (#1811) renv now supports use GitHub Enterprise servers gitcreds package authentication credentials. (#1814) renv::dependencies() now treats #| eval: !expr <...> chunk options truthy default, implying chunks scanned R package dependencies. (#1816) renv::dependencies() now requires usages import package namespace-qualified order handled via static analysis; , import::() parsed dependencies, (pkg) . (#1815) renv::load() gains profile argument, allowing one explicitly load specific profile associated renv project. See vignette(\"profiles\", package = \"renv\") https://rstudio.github.io/renv/articles/profiles.html details. renv::dependencies() longer includes R dependency versions declared DESCRIPTION file output. (#1806) Fixed issue renv fail infer dependencies R Markdown code chunks using engine ‘R’ (upper-case) rather ‘r’ (lower-case). (#1803) Fixed issue renv report --sync packages one packages used project installed. (#1788) Fixed issue renv -aggressively activate P3M repositories initializing project. (#1782) renv::status() now notifies user version R recorded lockfile match version R currently use. (#1779) Fixed issue packages appear multiple times lockfile, package installed multiple library paths. (#1781) Installation historical binaries packages enabled, now using Posit Public Package Manager (P3M) service instead Microsoft’s (now defunct) MRAN service. renv::init() now respects Remotes: field declared project’s DESCRIPTION file, . (#1522) renv::embed() now supports Quarto Markdown (.qmd) files. (#1700) renv now sets R_INSTALL_TAR environment variable match default tar executable () installing packages. (#1724) renv now uses --ssl-revoke-best-effort default downloading files using curl Windows. (#1739) Fixed issue renv::install() fail detect incompatible recursive package dependencies. (#1671) renv::install() now records remote information packages installed CRAN-like repositories, uses information generating lockfile restoring packages. helps ensure packages installed within renv project via calls like renv::install(\"\", repos = \"\") can still successfully restored future sessions. (#1765) renv::install() now lazily resolves project remotes. (#1755) renv::init() now respects Remotes declared within project’s DESCRIPTION file, . Calling renv::activate() without explicitly providing profile argument now preserves current profile, . Use renv::activate(profile = \"default\") ’d like re-activate project using default profile. (#1217) Fixed issue renv try prompt installation BiocManager activating project using Bioconductor. (#1754) Fixed issue directories containing large number files cause renv fail activate project. (#1733) Expanded set Linux distributions detected automatic transformation Posit Package Manager URLs install binary packages. renv now correctly detects Red Hat Enterprise Linux 9, Rocky Linux 8 9, SLES 15 SP4 SP5, Debian 11 12, AlmaLinux 8 9, Amazon Linux 2. (#1720, #1721)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-103","dir":"Changelog","previous_headings":"","what":"renv 1.0.3","title":"renv 1.0.3","text":"CRAN release: 2023-09-19 Fixed issue renv warn project appeared --sync using packages installed without explicit source recorded. (#1683) renv::install() gains exclude argument, can useful installing subset project dependencies. Fixed issue PPM repositories appropriately transformed correct binary repository renv::restore() using pak. renv::init() longer prompts user intended action projects containing library renv installed. (#1668) Fixed issue non-interactive usages renv::init() fail projects containing DESCRIPTION file. (#1663) Fixed issue cause code within project .Rprofile execute project loaded RStudio. (#1650) renv::snapshot() renv::status() gain dev argument. can used ’d like capture package dependencies Suggests field package’s DESCRIPTION file. (#1019)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-102","dir":"Changelog","previous_headings":"","what":"renv 1.0.2","title":"renv 1.0.2","text":"CRAN release: 2023-08-15 renv now parses package NAMESPACE files imported dependencies. (#1637) renv longer locks sandbox default. Fixed issue renv used wrong library paths attempting activate watchdog. cause 10 second delay activating sandbox.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-101","dir":"Changelog","previous_headings":"","what":"renv 1.0.1","title":"renv 1.0.1","text":"CRAN release: 2023-08-10 Fixed issue authentication headers duplicated using libcurl download method. (#1605) renv::use() now defaults setting isolate = TRUE sandbox = TRUE. Fixed issue renv watchdog fail load, leading slowness activating sandbox startup. (#1617) Fixed issue renv display warnings / errors renv::snapshot() options(renv.verbose = FALSE) set. display messages now controlled via renv.caution.verbose R option. (#1607, #1608) renv::load() now notifies user synchronization check took excessive amount time due number files scanned project. (#1573) renv::init() gains load argument, making possible initialize project without explicitly loading . (#1583) renv now uses lock synchronizing installed packages cache. help alleviate issues can arise multiple R processes installing caching packages concurrently. (#1571) Fixed regression parsing expressions within R Markdown chunk options. (#1558) Fixed issue prevented renv::install() functioning source-repositories included. (#1578) Fixed logic error reading RENV_AUTOLOAD_ENABLED. (#1580) renv::restore() longer runs without prompting load library empty. (#1543) renv::repair() now checks installed packages lack known remote source, updates DESCRIPTION files can infer appropriate remote source. typically occurs package installed local sources, appears maintained published remote repository (e.g. GitHub). previously done renv::snapshot(), ’ve rolled back change prompting -aggressive. (#1574) renv::status() now first reports uninstalled packages, reporting used <-> installed mismatches. (#1538) RENV_STARTUP_DIAGNOSTICS environment variable set TRUE, renv now displays short diagnostics report project’s autoloader run. can useful diagnosing renv slow load certain projects. (#1557) renv now ensures sandbox activated load, R processes launched renv sandbox library paths. (#1565) renv::restore() longer erroneously prompts determining packages need installed. (#1544) renv::update() now ensures prompt parameter properly respected package installation. (#1540) renv::activate() longer erroneously preserves previous library paths restarting session within RStudio. (#1530) Use correct spelling IRkernel package (#1528). Honor R_LIBCURL_SSL_REVOKE_BEST_EFFORT using external curl.exe binary download files. (#1624)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-100","dir":"Changelog","previous_headings":"","what":"renv 1.0.0","title":"renv 1.0.0","text":"CRAN release: 2023-07-07","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"new-features-1-0-0","dir":"Changelog","previous_headings":"","what":"New features","title":"renv 1.0.0","text":"New renv::checkout() installings latest-available packages repository. example, renv::checkout(date = \"2023-02-08\") install packages available 2023-02-08 Posit Package Manager repository. actions argument allows choose whether lockfile generated provided repositories (“snapshot”), whether packages installed provided repositories (“restore”). renv::deactivate() gains clean argument: TRUE delete renv files/directories, leaving project way found. renv::init() now uses Posit Public Package Manager default, new projects repositories already configured externally. See options renv.config.ppm.enabled, renv.config.ppm.default, renv.config.ppm.url ?config details (#430). renv::lockfile_create(), renv::lockfile_read(), renv::lockfile_write() renv::lockfile_modify() provide small family functions interacting renv lockfiles programmatically (#1438). Handling development dependencies refined. renv::snapshot() renv::status() longer track development dependencies, install() continues install (#1019). Suggested packages listed DESCRIPTION files declared development dependencies regardless whether ’re “package” project. MRAN integration now disabled default, pending upcoming shutdown Microsoft’s MRAN service. Users require binaries older R packages Windows + macOS can consider using instance CRAN mirrored Posit Public Package Manager (#1343).","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"bug-fixes-and-minor-improvements-1-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes and minor improvements","title":"renv 1.0.0","text":"Development versions renv now tracked using Git SHA current commit, rather version number ’s incremented every change (#1327). shouldn’t user facing impact, makes renv maintenance little easier. Fixed issue causing “restarting interrupted promise evaluation” warnings displayed querying available packages failed. (#1260) renv::activate() uses three option menu hopefully make choices clear (#1372). renv::dependencies() now discovers R package dependencies inside Jupyter notebooks (#929). renv::dependencies() includes packages used user profile (~/.Rprofile) renv::config$user.profile() TRUE. set development dependencies, means installed install() recorded snapshot. renv::dependencies() extracts dependencies text YAML headers looks like valid R code (#1288). renv::dependencies() longer treats box::use(module/file) using package module (#1377). renv::init() now prompts user select snapshot type project contains top-level DESCRIPTION file (#1485). renv::install(type = \"source\") now ensures source repositories used projects using PPM. (#927) renv::install() activates Bioconductor repositories installing package remote (e.g. GitHub) declares Bioconductor dependency (via non-empty ‘biocViews’ field) (#934). renv::install() respects project snapshot type, set. renv::install() now keeps source installing packages source (#522). renv::install() now validates binary packages can loaded installation, manner similar source packages (#1275). renv::install() now supports Bioconductor remotes form bioc::/, installing packages particular version Bioconductor. Aliases like ‘release’ ‘devel’ also supported (#1195). renv::install() now requires interactive confirmation want install packages (#587). renv::load() gives informative message lockfile present packages installed (#353). renv::load() longer attempts query package repositories checking project synchronized (#812). renv::load() longer duplicates entries PATH environment variable (#1095). renv::restore() can now use pak::pkg_install() install packages pak integration enabled. Set RENV_CONFIG_PAK_ENABLED = TRUE project’s .Renviron ’d like opt-behavior. Note requires nightly build pak (>= 0.4.0-9000); see https://pak.r-lib.org/dev/reference/install.html details. renv::restore() now emits error called within project contain lockfile (#1474). renv::restore() correctly restores packages downloaded installed r-universe (#1359). renv::snapshot() now standardises pak metadata CRAN packages installed via pak look CRAN packages installed renv install.packages() (#1239). renv::snapshot() finds missing packages, new prompt allows install continuing (#1198). renv::snapshot() longer requires confirmation writing first snapshot, since ’s action can easily undone (deleting renv.lock) (#1281). renv::snapshot() reports R version changes, even packages change (#962). renv::snapshot(exclude = <...>) longer warns attempting exclude package installed (#1396). renv::status() now uses compact display packages inconsistent combination installed, used, recorded. renv::status() now works like renv::restore() package versions different (#675). renv::update() can now update packages installed GitLab (#136) BitBucket (#1194). renv::settings$package.dependency.fields() now affects packages installed directly user, downstream dependencies packages. renv functions give clearer error renv.lock somehow become corrupted (#1027).","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0173","dir":"Changelog","previous_headings":"","what":"renv 0.17.3","title":"renv 0.17.3","text":"CRAN release: 2023-04-06 Fixed issue renv::install(\"bioc::\") fail BiocManager already installed. (#1184) Fixed issue package names included output renv::diagnostics(). (#1182) clarity message printed renv::status() improved; particular, renv better report recommended actions package required project installed. renv::snapshot() gains exclude argument, explicitly excluding certain packages generated lockfile. Fixed issue renv passing wrong argument name installed.packages(), causing usages renv fail R (<= 3.4.0). (#1173) renv now sets SDKROOT environment variable macOS detects R built using LLVM build clang macOS. renv::install() now parses remotes included within, example, DESCRIPTION file’s Config/Needs/... field. renv now checks index directory writable attempting use , e.g. R available packages index maintained renv. (#1171) renv now checks version curl used downloads appears functional, reports warning (example, requisite system library missing). version curl used downloads can also configured via RENV_CURL_EXECUTABLE environment variable.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0172","dir":"Changelog","previous_headings":"","what":"renv 0.17.2","title":"renv 0.17.2","text":"CRAN release: 2023-03-17 Fixed regression caused package hashes computed incorrectly cases. regression 0.17.1 release. (#1168)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0171","dir":"Changelog","previous_headings":"","what":"renv 0.17.1","title":"renv 0.17.1","text":"CRAN release: 2023-03-16 renv gains configuration option install.remotes, can used control whether renv attempts read use Remotes: field included installed packages. can set FALSE ’d like ignore field; e.g. know accessible. (#1133) General performance optimizations. particular, renv::update(check = TRUE) now execute much faster. renv now stores project settings within renv/settings.json rather renv/settings.dcf. Old settings automatically migrated. renv sandbox now placed within renv cache directory. (#1158) Fixed issue renv::status() erroneously report project --sync using explicit snapshots. (#1159) Fixed issue renv::hydrate() print spurious warnings. (#1160) renv::status() now suggests running renv::restore() packages installed project library. (#1060) Fixed issue renv fail query r-universe repositories. (#1156) renv longer tries set SDKROOT environment variable macOS R (>= 4.0.0). Fixed issue installation Bioconductor packages fail BiocManager installed. (#1156, #1155) Fixed issue amount time elapsed reported renv::install() failed include time spent retrieving packages.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0170","dir":"Changelog","previous_headings":"","what":"renv 0.17.0","title":"renv 0.17.0","text":"CRAN release: 2023-03-02 performance renv::snapshot() improved. renv now maintains index available packages, retrieved active package repositories, shared across R sessions. improve renv’s performance querying available packages across multiple different R sessions. renv::hydrate() gains prompt parameter. TRUE (default), renv prompt confirmation attempting hydrate active library. Improved handling package installation via SSH URLs git. (#667) Improved handling R version validation using projects Bioconductor. find renv erroneously reporting version R incompatible version Bioconductor using, can set options(renv.bioconductor.validate = FALSE) disable validation behaviour. (#1148) Package names can now associated remotes renv::install(); example, can use renv::install(\"igraph=igraph/rigraph\") install igraph package. mainly important using renv.auth authentication tools, package name remote needs declared explicitly. (#667) Fixed issue prevent renv::restore() functioning attempting install packages archived CRAN. (#1141) renv::install() gains dependencies argument, behaves similarly equivalent argument remotes::install_*(). particular, can set fields like Config/Needs/dev tell renv use custom DESCRIPTION fields dependency resolution installation. Fixed issue function variant renv.auth option resolved correctly. (#667) renv::install() now supports remotes trailing slash – slashes now removed. (#1135) Integration RStudio (Posit) Package Manager now disabled default aarch64 Linux instances. RENV_CACHE_MODE environment variable can now also used adjust permissions set downloaded package tarballs / binaries. (#988) Fixed issue fields form Remotes.1 enter lockfile records older versions R. (#736) Fixed performance renv::update() cases integration MRAN enabled. Fixed issue package installation using pak fail cases. renv_file_find() can now scan root directory Docker containers. (#1115) renv longer uses R temporary directory Windows sandbox. sandbox directory can customized via RENV_PATHS_SANDBOX environment variable required. (#835) renv now reports elapsed time installing packages. (#1104) projects using “explicit” snapshots, renv now reports package required project, package currently installed. (#949) Fixed issue renv::snapshot() fail detect changes made lockfile. Fixed issue renv emit JSON lockfiles parsed external JSON readers. (#1102) renv now marks sandbox non-writable, hopefully alleviate issues attempts update installed packages inadvertently install updated package sandbox. (#1090) renv::use() gains sandbox argument, allows one control whether system library sandboxed call renv::use(). (#1083) path Conda environment.yml file created renv can now customized via RENV_PATHS_CONDA_EXPORT environment variable. recommend setting within project-local .Renviron file appropriate. (#1089) Fixed issue renv sandbox location respect active renv profile. (#1088)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0160","dir":"Changelog","previous_headings":"","what":"renv 0.16.0","title":"renv 0.16.0","text":"CRAN release: 2022-09-29 renv now supports installation packages remotes form =. However, provided package name ignored instead parsed remote . (#1064) renv now passes along headers produced renv.download.headers option bootstrapping call utils::download.file(). (#1084) renv now reports renv::snapshot() change update version R recorded lockfile. (#1069) renv now supports install.packages.check.source R option, used allow R query source repositories even option options(pkgType = \"binary\") set. (#1074) renv better handles packages containing git submodules installed GitHub remotes. (#1075) renv now handles local sources within current working directory. (#1079) renv sandbox enabled default. Unix, sandbox now created default within project’s renv/sandbox library. Windows, sandbox created within R session’s tempdir(). path renv sandbox can customized via RENV_PATHS_SANDBOX environment variable required. Fixed issue renv::status() report spurious changes comparing packages installed using pak cases. (#1070) renv::restore() now also ensures project activate script updated successful restore. (#1066) Fixed issue renv attempt install package repository archives even type = \"binary\" set. (#1046) Fixed issue package installation fail R session configured use multiple repositories, provide information available packages certain binary arms repository. (#1045) renv now uses jsonlite reading lockfiles loaded. help ensure useful errors provided manually-edited lockfiles contain JSON parsing error. jsonlite package loaded, renv fall back internal JSON parser. (#1027) Fixed issue cause renv fail source user ~/.Rprofile attempted register global calling handlers, e.g. prompt::set_prompt() . (#1036) (Linux ) renv now resets ACLs packages copied cache, avoid persisting default ACLs might inherited packages installed local project library. desired, behavior can disabled setting RENV_CACHE_ACLS environment variable FALSE. need finer control ACLs set packages moved cache, consider defining custom callback via renv.cache.callback R option. (#1025) Fixed issue .gitignore inclusion rules sub-directories parsed correctly renv dependency discovery. (#403) Fixed issue renv report spurious diffs within renv::status() comparing package records installed pak versus default R package installer. (#998) Fixed issue renv::use_python() cause Requirements field packages lockfile unintentionally dropped. (#974) R option renv.cache.callback can now set, run user-defined callback package copied cache. can useful ’d like take action cached package’s contents package moved cache. (Unix ) RENV_CACHE_MODE environment variable can now used change access permissions packages copied cache. set, package copied cache, renv use chmod -Rf try change permissions cache entry requested permissions. (Unix ) RENV_CACHE_USER environment variable can now used change ownership folders copied cache. set, package copied cache, renv use chown -Rf try change ownership cache entry requested user account. Fixed issue repositories containing multiple packages sub-directories fail install. (#1016)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0155","dir":"Changelog","previous_headings":"","what":"renv 0.15.5","title":"renv 0.15.5","text":"CRAN release: 2022-05-26 Fixed issue indexing packages package cellar slow. (#1014) Fixed issue installation packages Bioconductor’s binary Linux package repositories fail. (#1013) renv::restore() now supports restoration packages installed R-Forge. (#671) Fixed issue renv::init(bioconductor = TRUE) update version Bioconductor used project setting already set. now possible “update” existing lockfile using renv::snapshot(update = TRUE). set, records existing old lockfile, new lockfile, preserved. (#727) Fixed issue renv fail parse Git remotes users whose username contains number. (#1004) renv longer infers dependency “quarto” R package projects containing _quarto.yml file. (#995) Fixed issue renv fail download package MRAN compatible source package version available active R repositories. (#990) renv now reports permission errors download clearly. (#985) Fixed issue RENV_PATHS_LIBRARY_ROOT_ASIS interpreted correctly. (#976) renv::modify() gains changes argument, can used modify project lockfile non-interactively. renv::clean() now returns project directory, documented. (#922) Fixed issue renv fail parse embedded YAML chunk options R Markdown documents. (#963) renv now sets default placeholder names repos R option, repository URLs happen unnamed. (#964) Fixed issue renv didn’t respect PATH ordering discovering Python installations via renv_python_discover(). (#961) Fixed issue renv fail install packages containing multibyte unicode characters DESCRIPTION file. (#956) Fixed detection Rtools 4.2 (#1002)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0154","dir":"Changelog","previous_headings":"","what":"renv 0.15.4","title":"renv 0.15.4","text":"CRAN release: 2022-03-02 Fixed issue package installation fail referencing cache via tilde-aliased path, e.g. ~/.local/share/renv. (#953)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0153","dir":"Changelog","previous_headings":"","what":"renv 0.15.3","title":"renv 0.15.3","text":"CRAN release: 2022-02-28 variety fixes R CMD check. renv gains experimental function, renv::autoload(), used helper automatically loading project R processes launched within sub-directory project. See ?renv::autoload details. renv now print warning message attempting read lockfile containing merge conflict markers (e.g. git merge). (#945) Fixed issue renv::install() install wrong library path Windows, R installation site-wide profile mutated library paths. (#941) Fixed issue renv::install() fail find package within cache using abbreviated commit hash installation. (#943) Fixed issue renv’s automatic snapshot run calls renv::install() cases. (#939) Fixed issue renv incorrectly copy package cache, cached version package requested version package package version, even retrieved different sources. (#938) path renv tarball can now set via environment variable RENV_BOOTSTRAP_TARBALL, used help renv bootstrap local sources. can either path directory containing renv source tarballs, path tarball . Fixed issue R site library appropriately masked resumed RStudio sessions. (#936)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0152","dir":"Changelog","previous_headings":"","what":"renv 0.15.2","title":"renv 0.15.2","text":"CRAN release: 2022-01-24 Fixed issues encountered R CMD check.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0151","dir":"Changelog","previous_headings":"","what":"renv 0.15.1","title":"renv 0.15.1","text":"CRAN release: 2022-01-13 Fixed issue renv inadvertently inserted extra newlines DESCRIPTION file adding Remotes fields install. (#914) Fixed issue packages installed remote sub-directory fail install later re-installed cache. (#913) renv now recognizes YAML chunk options form #| key: value used R Markdown documents. (#912) Fixed issue R site library visible renv projects system library sandbox disabled. Fixed issue renv update wrong .gitignore R processes launched callr (e.g. devtools::install). (#910) Fixed issue renv fail read mis-encoded DESCRIPTION files. (#908) Fixed issue config$cache.symlinks() report NULL unset. (#906)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0150","dir":"Changelog","previous_headings":"","what":"renv 0.15.0","title":"renv 0.15.0","text":"CRAN release: 2022-01-04 development branch renv moved master main. renv package records lockfile now include Requirements entry, gives list R packages package depends way. primarily internal use pak package. Fixed issue packages containing DESCRIPTION files using latin1 encoding read correctly renv. Fixed issue cause renv::dependencies() fail malformed DESCRIPTION file encountered. (#892) path project-local renv folder can now configured via RENV_PATHS_RENV environment variable. can useful ’d prefer store project’s renv resources within alternate location project. (#472) renv now uses external library default R package projects, library located within tools::R_user_dir(\"renv\", \"cache\"). directory can configured via RENV_PATHS_LIBRARY_ROOT environment variable desired. See vignette(\"packages\", package = \"renv\") details. (#384) renv now uses repositories defined within project lockfile () attempting bootstrap project. (#820) renv sandbox now disabled default – see #614 details. renv gains function repair(), used attempt repair project library links global package cache appear broken. (#378) Fixed issue staging library used install fail inherit directory permissions target library . (#331) Fixed regression caused renv::history() fail. (#886) renv gains experimental support pak package. Set RENV_CONFIG_PAK_ENABLED = TRUE appropriate .Renviron file enable pak integration. enabled, calls renv::install() use pak download install packages. renv::init() gains bioconductor argument, used initialize project particular Bioconductor release. can also use renv::init(bioconductor = TRUE) initialize latest-available release version R used. Project settings can now overridden setting R option name. example, one force project use Bioconductor 3.14 setting options(renv.settings.bioconductor.version = \"3.14\") within project .Rprofile (similar startup R profile). ad-hoc package repository called “local sources” renamed “package cellar”. addition, path cellar now controlled RENV_PATHS_CELLAR environment variable, rather RENV_PATHS_LOCAL. change made reduce confusion “local sources” packages located somewhere filesystem, opposed packages explicitly placed ad-hoc repository. RENV_PATHS_LOCAL remains supported backwards compatibility. RENV_PATHS_CELLAR environment variable can now set multiple paths. Use ; separator paths; example, RENV_PATHS_LOCAL=/path//sources/v1;/path//sources/v2. (#550) Packages installed via e.g. renv::install(\"./path//package\") now retain relative path package within lockfile. (#873) Fixed issue invalid config option values properly reported. (#773) renv now supports restoration packages installed via one r-universe repositories. renv gains bioconductor.version project setting, used freeze version Bioconductor used particular project. set, override version might selected via BiocManager package. (#864) renv now infers parameterized R Markdown documents dependency shiny package. addition, R code included within params: list parsed dependencies. (#859) renv now ignores hidden directories dependency discovery default. want force particular hidden directory included discovery, can use .renvignore file explicit inclusion criteria; e.g. !.hidden/. renv now supports *release remotes specifier GitHub repositories, requesting installation latest declared release package GitHub. (#792) renv now handles packages stored within sub-directory Git repository better. (#793) Fixed issue renv::history() fail resolve correct lockfile path working directory changed. (#834) Refined dependency discovery within glue::glue() expressions. renv now parses packages referenced via base_format field within R Markdown document’s YAML header. (#854) Fixed issue renv fail produce appropriate binary repository URL RSPM repositories built using Red Hat Enterprise Linux. Fixed issue renv::snapshot() cause environment name / path associated Python environment omitted lockfile. (#843) Fixed issue renv::restore() fail restore packages referred source via explicit path Source field. (#849) renv longer requires explicit user consent used within Singularity containers. (#824, @kiwiroy) renv now respects R_PROFILE_USER environment variable, addition user.profile configuration option, considering whether user .Rprofile examined package dependencies. (#821) renv auto-loader can now disabled setting environment variable RENV_AUTOLOADER_ENABLED = FALSE. can useful ’d like explicitly control project loaded, e.g. calling renv::load() explicitly. renv::snapshot() gains repos argument, used force lockfile generated requested set R repositories encoded within. renv now validates repos option, used renv::snapshot(), named vector. (#811) Fixed issue renv’s shims, e.g. install.packages(), failed pass along optional arguments shimmed function correctly. (#808)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0140","dir":"Changelog","previous_headings":"","what":"renv 0.14.0","title":"renv 0.14.0","text":"CRAN release: 2021-07-21 renv now uses tools::R_user_dir() resolve default path global renv cache, R installations 4.0.0 greater. renv cache still exists old location, location used instead. change affect brand new installations renv newer versions R. Fixed issue renv tests failing R (>= 4.2.0). renv longer auto-activate within R processes launched via R CMD INSTALL. behavior can controlled necessary via RENV_ACTIVATE_PROJECT environment variable – set TRUE force project current working directory activated, FALSE suppress renv auto-loader altogether. (#804) Added dependency discovery support R utility scripts identified shebang line instead file extension. (#801; @klmr) Fixed issue renv::install(\"\", type = \"\") attempt install package sources, even current system requisite build tools available. (#800) renv::scaffold() gains settings argument, used create project scaffolding default project options set. (#791) renv now determines default branch name packages installed GitLab without explicit reference supplied; example, renv::install(\"gitlab::/\"). (#795) renv now infers dependency bslib package R Markdown documents using custom themes. (#790) renv now prompt users activate current project calling renv::snapshot() renv::restore() within project yet activated. (#777) renv now improved handling git remotes. (#776; @matthewstrasiotto) renv::restore() gains exclude argument, used exclude subset packages restore. (#746) Fixed issue renv::dependencies() fail parse dependencies calls glue::glue() used custom open close delimiters. (#772) Fixed issue renv::init(bare = TRUE) unnecessarily scour project R package dependencies. (#771) Fixed issue renv fail install packages located GitHub within sub-subdirectories. (#759) renv gains function embed(), used embed lockfile R document (via call renv::use()). renv::use() gains lockfile argument. can useful R Markdown documents scripts ’d like run context particular lockfile applied. renv::rebuild() gains type parameter, parity renv::install(). Fixed issue renv incorrectly copy incompatible version R package site library project library install. (#750) renv::dependencies() can now parse () usages parsnip::set_engine(). renv::dependencies() now improved handling piped expressions. Fixed crash dependency discovery encountering box::use() declarations use trailing comma, longer treat . .. package names. (@klmr) renv::clean() longer attempts clean system library default. (#737) Fixed issue install.packages() fail used within renv project install package local sources. (#724) chunk renv.ignore parameter can now set FALSE. set, renv explicitly parse dependencies chunks even chunk metadata told renv ignore (e.g. marked eval=F). (#722) Fixed issue chunks chunk option eval=F still scanned dependencies. (#421) interactive sessions, renv::use_python() now prompt version Python used. Python installations set common locations searched. See ?renv::use_python() details. Fixed issue renv fail retrieve packages archives lockfile entry tagged RemoteSha field. renv::restore() now prefer restoring packages repository named Repository field available. name matched repository names set R repos option, encoded renv lockfile. (#701) renv now supports discovery dependencies within interpolated strings used glue package. RENV_CONFIG_EXTERNAL_LIBRARIES can now configured use multiple library paths, delimited either :, ;, ,. (#700) renv gains configuration option, exported.functions, controlling functions objects placed R search path renv attached (e.g. via library(renv)). Set NULL instruct renv place functions search path. helps avoid issues , example, renv::load() masking base::load(). set, usages renv APIs must explicitly qualified renv:: prefix.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0132","dir":"Changelog","previous_headings":"","what":"renv 0.13.2","title":"renv 0.13.2","text":"CRAN release: 2021-03-30 renv::install(\"user/repo/subdir spaces\") now works expected. (#694) renv can now parse package dependencies declared targets::tar_option_set(packages = <...>). (#698) renv longer performs automatic snapshot following user-canceled renv action – example, renv::restore() canceled, next automatic snapshot suppressed. (#697) Added vcs.ignore.local project setting, control whether project’s renv/local folder added renv’s VCS ignore file (e.g. renv/.gitignore). (#696) Fixed issue renv’s bootstrapping code inadvertently bootstrap wrong version renv, source binary versions renv CRAN sync. (#695) Fixed issue renv::status() provide misleading message packages recorded lockfile, explicitly required project. (#684)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0131","dir":"Changelog","previous_headings":"","what":"renv 0.13.1","title":"renv 0.13.1","text":"CRAN release: 2021-03-18 renv::clean() gains actions argument, allowing caller control specific actions taken clean() operation. renv longer performs automatic snapshot call renv::status(). (#651) Fixed issue attempts transform RSPM repository URLs fail copy R installed without local CRAN_mirrors.csv file. Fixed issue renv::init() fail passed relative path directory. (#673) Fixed issue renv::dependencies() miss dependencies R Markdown YAML headers containing multiple output formats. (#674) renv::install() now better respects Remotes field project DESCRIPTION file, available. (#670) RENV_DOWNLOAD_METHOD now treated alias RENV_DOWNLOAD_FILE_METHOD. Fixed issue renv fail load ~/.Rprofile existed empty file.","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0130","dir":"Changelog","previous_headings":"","what":"renv 0.13.0","title":"renv 0.13.0","text":"CRAN release: 2021-02-24 renv::snapshot() longer creates renv/activate.R file project folder one already exist. (#655) renv::hydrate() function gains update argument, used control whether renv::hydrate() chooses update packages invoked. set TRUE, version package installed source library newer project library, renv copy version package project library. (#647) RENV_PATHS_PREFIX_AUTO environment variable can now set instruct renv include OS-specific component part library cache paths. primarily useful Linux systems, one might want share global cache multiple different operating systems. path component constructed ID VERSION_CODENAME / VERSION_ID components system’s /etc/os-release file. renv’s dependency discovery machinery now preliminary support packages imported via box package; e.g. box::use(dplyr[...]). Multiple cache paths can now specified, cache path separated either ; :. can useful ’d like use multiple package caches within project; example, ’d like share read-cache set projects. (#653, @vandenman) Fixed issue renv fail discover dependencies directories large .gitignore .renvignore files. (#652) renv gains new configuration option, install.shortcuts. enabled, renv discovers package installed already available user site libraries, renv instead install copy package project library. (#636) renv gains new function, renv::use(), used download, install, load set packages directly within R script. renv::use() can make easier share standalone R script, packages required install script embedded directly script. inspired part groundhog package. renv::install(\".\") can now used install package sources within current working directory. (#634) Fixed issue renv::update() fail package installed GitHub missing RemoteHost field DESCRIPTION file. (#632) renv now support custom project profiles. Profiles can used activate different sets project libraries + lockfiles different workflows given project. See vignette(\"profiles\", package = \"renv\") details. Fixed issue attempts initialize renv project path containing non-ASCII characters fail Windows. (#629) Fixed issue renv::install(\"\") fail renv chose install package MRAN rather one active package repositories. (#627) renv defaults using project’s renv/staging folder staged / transactional installs. Use RENV_PATHS_LIBRARY_STAGING environment variable granular control staging library path required. fixes issues Windows creating junction points global package cache Windows. (#584) renv longer skips downloading requested source package existing cached download exists appears valid. help avoid issues attempting install package whose associated tarball changed remotely. (#504) bootstrap, renv now attempt download unpack binary copy renv available specified package repositories. renv now always attempts bootstrap R Project’s Cloud package repository, fallback case repository available. (#613) renv::rebuild() now uses latest-available version requested package(s) packages currently installed. Fixed issue renv::restore(library = \"/path//lib\") fail restore packages, packages already installed active library paths (reported .libPaths()). (#612) renv::snapshot() gains reprex argument. Set TRUE ’d like embed renv lockfile part reproducible example, generated reprex package. renv::status() now reports packages referenced project’s scripts, neither installed project library recorded lockfile. (#588) Fixed issue package installation fail configure.vars option set named character, rather named list. (#609)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0125","dir":"Changelog","previous_headings":"","what":"renv 0.12.5","title":"renv 0.12.5","text":"CRAN release: 2021-01-09 Fixed issue renv fail bootstrap. (#608)","code":""},{"path":"https://rstudio.github.io/renv/dev/news/index.html","id":"renv-0124","dir":"Changelog","previous_headings":"","what":"renv 0.12.4","title":"renv 0.12.4","text":"CRAN release: 2021-01-07 renv now invalidates available packages cache https_proxy environment variable changes. (#579) renv::install() now install latest-available version package local sources, package available newer package available active package repositories. (#591) configuration option startup.quiet added, allowing one control whether renv display typical startup banner project loaded. renv now better handles unloaded reloaded within R session. particular, warnings related corrupted lazy-load database longer occur. (#600) renv longer reinstalls packages already installed --date bare calls renv::install(). renv now uses R temporary directory staging, performing transactional restores / installs. need control path used staged installs, please set RENV_PATHS_LIBRARY_STAGING environment variable. install.verbose configuration option added. set TRUE, renv stream output generated R performing package installation. can helpful cases diagnosing failed restore / install. (#330) Fixed issue renv fail parse R Markdown chunk headers empty label. (#598) environment variable RENV_PATHS_LIBRARY_ROOT_ASIS can now used control whether project name used -forming library path within RENV_PATHS_LIBRARY_ROOT folder. Set \"TRUE\" prefer renv append unique identifier project’s library path. (#593) Fixed issue GitLab references URL encoded. (#590) renv longer emits warnings parsing multi-mode R files make use re-used knitr chunks (specified <