Skip to content

Commit

Permalink
deploy: cd4eda0
Browse files Browse the repository at this point in the history
  • Loading branch information
amyheather committed Jul 15, 2024
1 parent c702ce9 commit 698a5fc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
15 changes: 15 additions & 0 deletions _sources/r/environments.md.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# Dependency management in R

Can use gnome-box to run a new system.

CRAN won't let you use old versions of packages.

People like R because they can just use one R environment and everything works in that latest environment. General recommendation is just to use the latest stuff

"A big reason R doesn't have as rich an ecosystem for package installation tools (as compared to other languages) is because CRAN's design alleviates many of the challenges traditionally faced in package installation. As an example, CRAN checks new package updates to ensure they work with their upstream reverse dependencies. If updates fail to pass these "revdep checks", the package author must shoulder the burden of getting those reverse dependencies in line. Overall, this ensures that users going to install.packages get a set of packages that work together. Other languages push more of this work onto the person (and client) installing the package. However, as the R package ecosystem has grown, and people have developed more mission-critical workflows that require reproducibility, we have seen an uptick in the need for package management (as opposed to installation) tools." [[source]](https://forum.posit.co/t/what-is-the-current-state-of-r-package-mangers-in-2019/25143/2)

Issues with renv:

* "Software, including R packages, can generally be delivered in two forms: as binaries or as source code. If you are building from the source code, you may in some case need a compilation toolchain on your computer. If that toolchain is missing, it can lead to errors... With renv, you often want to install older versions of the packages, which won’t be available as binaries from CRAN. This means you are more likely to have to compile the package yourself and see this kind of errors, even though renv is not causing them." [[source]](https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/)
* May get issues with renv as old version of package is not "supported by recent R versions or modern compilers". [[source]](https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/)

Possible solutions:

* You could only install pre-compiled binaries. "This is not possible while installing from CRAN as CRAN only provides binaries for recent versions of R and for a limited number of platforms. But Posit for example provides a larger collection of binaries, for different package versions, and different platforms, via their Public Posit Package Manager (PPM)." [[source]](https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/)
* renv with rig - to specify R version [[source]](https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/)
* Docker, Nix and others - for entire software stack [[source]](https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/)

Binary packages, pre-compiled, etc. etc.

[CRAN Task View Initiative](https://cran.r-project.org/web/views/ReproducibleResearch.html) suggests checkpoint, containerit, dateback, groundhog, liftr, miniCRAN, packrat, rang, renv, Require, switchr.
Expand Down Expand Up @@ -35,6 +48,8 @@ Binary packages, pre-compiled, etc. etc.
* 237 monthly downloads, last published 19 June 2019, [[source]](https://www.rdocumentation.org/packages/liftr/versions/0.9.2)
* miniCRAN
* 1557 monhtly downloads, last published 28 March 2024, [[source]](https://www.rdocumentation.org/packages/miniCRAN/versions/0.3.0)
* Nix
* <https://www.brodrigues.co/blog/2023-07-13-nix_for_r_part1/>
* packrat
* `packrat has been soft-deprecated and is now supseded by renv` [[source]](https://www.rdocumentation.org/packages/packrat/versions/0.9.2)
* pak
Expand Down
17 changes: 17 additions & 0 deletions r/environments.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,21 @@

<div class="section" id="dependency-management-in-r">
<h1>Dependency management in R<a class="headerlink" href="#dependency-management-in-r" title="Permalink to this heading">#</a></h1>
<p>Can use gnome-box to run a new system.</p>
<p>CRAN won’t let you use old versions of packages.</p>
<p>People like R because they can just use one R environment and everything works in that latest environment. General recommendation is just to use the latest stuff</p>
<p>“A big reason R doesn’t have as rich an ecosystem for package installation tools (as compared to other languages) is because CRAN’s design alleviates many of the challenges traditionally faced in package installation. As an example, CRAN checks new package updates to ensure they work with their upstream reverse dependencies. If updates fail to pass these “revdep checks”, the package author must shoulder the burden of getting those reverse dependencies in line. Overall, this ensures that users going to install.packages get a set of packages that work together. Other languages push more of this work onto the person (and client) installing the package. However, as the R package ecosystem has grown, and people have developed more mission-critical workflows that require reproducibility, we have seen an uptick in the need for package management (as opposed to installation) tools.” <a class="reference external" href="https://forum.posit.co/t/what-is-the-current-state-of-r-package-mangers-in-2019/25143/2">[source]</a></p>
<p>Issues with renv:</p>
<ul class="simple">
<li><p>“Software, including R packages, can generally be delivered in two forms: as binaries or as source code. If you are building from the source code, you may in some case need a compilation toolchain on your computer. If that toolchain is missing, it can lead to errors… With renv, you often want to install older versions of the packages, which won’t be available as binaries from CRAN. This means you are more likely to have to compile the package yourself and see this kind of errors, even though renv is not causing them.” <a class="reference external" href="https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/">[source]</a></p></li>
<li><p>May get issues with renv as old version of package is not “supported by recent R versions or modern compilers”. <a class="reference external" href="https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/">[source]</a></p></li>
</ul>
<p>Possible solutions:</p>
<ul class="simple">
<li><p>You could only install pre-compiled binaries. “This is not possible while installing from CRAN as CRAN only provides binaries for recent versions of R and for a limited number of platforms. But Posit for example provides a larger collection of binaries, for different package versions, and different platforms, via their Public Posit Package Manager (PPM).” <a class="reference external" href="https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/">[source]</a></p></li>
<li><p>renv with rig - to specify R version <a class="reference external" href="https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/">[source]</a></p></li>
<li><p>Docker, Nix and others - for entire software stack <a class="reference external" href="https://www.r-bloggers.com/2024/05/things-that-can-go-wrong-when-using-renv/">[source]</a></p></li>
</ul>
<p>Binary packages, pre-compiled, etc. etc.</p>
<p><a class="reference external" href="https://cran.r-project.org/web/views/ReproducibleResearch.html">CRAN Task View Initiative</a> suggests checkpoint, containerit, dateback, groundhog, liftr, miniCRAN, packrat, rang, renv, Require, switchr.</p>
<ul class="simple">
Expand Down Expand Up @@ -526,6 +538,11 @@ <h1>Dependency management in R<a class="headerlink" href="#dependency-management
<li><p>1557 monhtly downloads, last published 28 March 2024, <a class="reference external" href="https://www.rdocumentation.org/packages/miniCRAN/versions/0.3.0">[source]</a></p></li>
</ul>
</li>
<li><p>Nix</p>
<ul>
<li><p><a class="reference external" href="https://www.brodrigues.co/blog/2023-07-13-nix_for_r_part1/">https://www.brodrigues.co/blog/2023-07-13-nix_for_r_part1/</a></p></li>
</ul>
</li>
<li><p>packrat</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">packrat</span> <span class="pre">has</span> <span class="pre">been</span> <span class="pre">soft-deprecated</span> <span class="pre">and</span> <span class="pre">is</span> <span class="pre">now</span> <span class="pre">supseded</span> <span class="pre">by</span> <span class="pre">renv</span></code> <a class="reference external" href="https://www.rdocumentation.org/packages/packrat/versions/0.9.2">[source]</a></p></li>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 698a5fc

Please sign in to comment.