https://github.com/bisaloo/sessioninfo2renv
Convert sessioninfo output to an renv lockfile
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Keywords
r
renv
reproducibility
reproducible-environments
reproducible-research
reproducible-science
sessioninfo
Last synced: 9 months ago
·
JSON representation
Repository
Convert sessioninfo output to an renv lockfile
Basic Info
- Host: GitHub
- Owner: Bisaloo
- License: other
- Language: R
- Default Branch: main
- Homepage: http://hugogruson.fr/sessioninfo2renv/
- Size: 1.11 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
r
renv
reproducibility
reproducible-environments
reproducible-research
reproducible-science
sessioninfo
Created 9 months ago
· Last pushed 9 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# sessioninfo2renv
[](https://github.com/Bisaloo/sessioninfo2renv/actions/workflows/R-CMD-check.yaml)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
Software users and researchers are encouraged to provide information about their R session in order to facilitate reproducibility and help with debugging.
The [sessioninfo R package](https://sessioninfo.r-lib.org/) provides a convenient way to gather and display this information.
However, it can be tedious to locally recreate the R environment of another user based on the output of `sessioninfo::session_info()` output.
The `sessioninfo2renv` package provides a function to convert the output of `sessioninfo::session_info()` to a lockfile (`renv.lock`) that can be used by the [renv R package](https://pkgs.rstudio.com/renv/) to recreate the R environment.
## Installation
You can install the development version of sessioninfo2renv from [GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("Bisaloo/sessioninfo2renv")
```
## Example
Let's see this in action!
For this, we are going to use a real session info output that was attached to
a reprex in ggplot2:
```{r}
library(sessioninfo2renv)
example_sessioninfo <- system.file("extdata", "session_info.txt", package = "sessioninfo2renv")
cat(readLines(example_sessioninfo), sep = "\n")
```
We can "unprint" this output and get back a `session_info` object with the
`unformat_session_info()` function:
```{r}
session_info_obj <- unformat_session_info(example_sessioninfo)
```
This `session_info` object can then be converted to a lockfile with the
`as_lockfile()` function:
```{r, eval = FALSE}
as_lockfile(session_info_obj, lockfile = "renv.lock")
```
Finally, this lockfile can be passed to `renv::restore()` to recreate the R
environment:
```{r, eval = FALSE}
renv::restore(lockfile = "renv.lock")
```
Owner
- Name: Hugo Gruson
- Login: Bisaloo
- Kind: user
- Location: Heidelberg
- Company: EMBL
- Website: https://hugogruson.fr/
- Repositories: 102
- Profile: https://github.com/Bisaloo
Evolutionary Biologist turned Research Software Engineer in R.
GitHub Events
Total
- Watch event: 1
- Push event: 3
Last Year
- Watch event: 1
- Push event: 3
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/dependency-change.yaml
actions
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint-changed-files.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.7.3 composite
- actions/checkout v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- untitaker/hyperlink 0.1.44 composite
.github/workflows/pull-from-packagetemplate.yaml
actions
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/upload-artifact v4 composite
- peter-evans/create-pull-request v7 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v5 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/update-citation-cff.yaml
actions
- actions/checkout v4 composite
- peter-evans/create-pull-request v7 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 4.1.0 depends
- dplyr * imports
- jsonlite * imports
- purrr * imports
- rlang * imports
- jsonvalidate * suggests
- knitr * suggests
- renv * suggests
- rmarkdown * suggests
- sessioninfo * suggests
- spelling * suggests
- testthat >= 3.0.0 suggests
- withr * suggests