knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
renv
uses a lockfile to capture the state of your \R library at some point in time.
It is stored as a collection of records, with different records defining:
renv
used when generating the lockfile;R
used in that project;For example, here is a simple lockfile capturing a single package Matrix
:
[renv] Version=0.2.0 [R] Version=3.5.3 Repositories= CRAN=https://cran.rstudio.com/ [R/Package/Matrix] Package=Matrix Version=1.2-17 Source=CRAN Hash=b10030fd8c964dbecd79719236d4a668
The function renv::snapshot()
is used to create this lockfile, and by default writes
these records to the file renv.lock
. Later, if you need to reinstall the specific
package versions as recorded in renv.lock
, you can use renv::restore()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.