Skip to content

Commit

Permalink
Add apt.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed May 31, 2023
1 parent e37237f commit d8eb9f8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Minimal Example of Tutorial in Quarto with R and System Requirements

[index.qmd](index.qmd) show all the **required** metadata used by Methods Hub.
[`index.qmd`](index.qmd) show all the **required** metadata used by Methods Hub.

This repository uses [install.R](install.R) as [configuration file](https://mybinder.readthedocs.io/en/latest/using/config_files.html).
This repository uses [`install.R`](install.R) and [`apt.txt`](apt.txt) as [configuration file](https://mybinder.readthedocs.io/en/latest/using/config_files.html).
[`apt.txt`](apt.txt) is required because of the system requirements of the [units R package](https://cran.r-project.org/web/packages/units/index.html).
Without the [`apt.txt`](apt.txt), the rendering of [`index.qmd`](index.qmd) will raise a error similar to

```
Quitting from lines 31-38 (index.qmd)
Error: package or namespace load failed for 'units' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/srv/rlibs/units/libs/units.so':
libudunits2.so.0: cannot open shared object file: No such file or directory
In addition: Warning message:
In do_once((if (is_R_CMD_check()) stop else warning)("The function xfun::isFALSE() will be deprecated in the future. Please ", :
The function xfun::isFALSE() will be deprecated in the future. Please consider using base::isFALSE(x) or identical(x, FALSE) instead.
Execution halted
```
1 change: 1 addition & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libudunits2-dev
10 changes: 8 additions & 2 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ plot(rnorm(10), rnorm(10))

## Dependencies

Packages that need to be installed for the reader should be listed in the `install.R` file. For example, with
Packages that need to be installed for the reader should be listed in the `install.R` file. For example,

```r
install.packages("units")
```

in the `install.R` file, is possible to execute
R packages with system requirements, must have the system requirements installed using the `apt.txt`. For example,

```
libudunits2-dev
```

With the R package in the `install.R` file and the system requirements in the `apt.txt` file, is possible to execute

```{r}
library(units)
Expand Down

0 comments on commit d8eb9f8

Please sign in to comment.