-
Notifications
You must be signed in to change notification settings - Fork 10
/
z-developers-vignette-save-the-nix-package-versions-data.Rmd
66 lines (51 loc) · 1.65 KB
/
z-developers-vignette-save-the-nix-package-versions-data.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: "z - Developers Vignette: Save the Nix Package Versions data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{z-developers-vignette-save-the-nix-package-versions-data}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r, include=FALSE}
library(rix)
```
This vignette is only needed for the developers of `{rix}`.
To install old versions of R, specific Nix revisions must be used. This tool
[Nix Package Versions](https://lazamar.co.uk/nix-versions/) provides a simple
web-interface to look for packages and get their revisions.
It is possible to scrape the table and get the data, but the code below
should not be executed and is instead kept for historcial reasons:
```
library(rvest)
library(dplyr)
library(janitor)
r_nix_revs <- read_html("https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=r") |>
html_element("table") |>
html_table() |>
clean_names() |>
filter(!grepl("wrapper", version)) |>
select(-package)
```
The code above provided commits up until version 4.3.1. The commit for the 4.3.2
release does not use the above code, instead we manually chose the last commit
that contains all the fixes that were merged during this release. This ensures
that a maximum of packages are in a working state.
```{r parsermd-chunk-1, eval = TRUE}
library(rix)
data("r_nix_revs")
revision_4.3.2 <- as.data.frame(
list(
"version" = "4.3.2",
"revision" = "219f896bdf192721446db4fedc338eebf732057d",
"date" = "2024-03-10"
)
)
r_nix_revs <- rbind(r_nix_revs,
revision_4.3.2)
```