Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joundso/requirements
Install R packages from a raw string or a text file like `requirements.txt`.
https://github.com/joundso/requirements
install r requirements
Last synced: 2 months ago
JSON representation
Install R packages from a raw string or a text file like `requirements.txt`.
- Host: GitHub
- URL: https://github.com/joundso/requirements
- Owner: joundso
- License: gpl-3.0
- Created: 2021-06-15T11:56:14.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T14:01:08.000Z (almost 2 years ago)
- Last Synced: 2024-09-30T03:58:16.623Z (3 months ago)
- Topics: install, r, requirements
- Language: R
- Homepage:
- Size: 53.7 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# requiRements
[![codecov](https://codecov.io/gh/joundso/requirements/branch/master/graph/badge.svg)](https://app.codecov.io/gh/joundso/requirements)
[![CRAN Status Badge](https://www.r-pkg.org/badges/version-ago/requiRements)](https://cran.r-project.org/package=requiRements)
[![CRAN Checks](https://badges.cranchecks.info/worst/requiRements.svg)](https://cran.r-project.org/web/checks/check_results_requiRements.html)The R package `requiRements` provides the ability to install all packages provided in a text or given a raw string.
This is meant to simply keep all e.g project dependent packages in one file (like the demo `requirements.txt` within `./data-raw/requirements.txt`) and install them all in a rush by using `requiRements::install("./requirements.txt")`.This is well known from python and now available within R.
## Installation
You can install `requiRements` directly from CRAN:
```r
install.packages("requiRements")
```The development version can be installed using
```r
install.packages("devtools")
devtools::install_github("joundso/requirements", ref = "development")
```## Basic functions
### Install some packages providing a single string
```r
## Test it with a string:
demo_string <- "
DIZtools
data.table
joundso/mainzelliste-connector
miracum/misc-diztools@dev
# this_one_will_be_ignored
"
requiRements::install(packages = demo_string)
```### Install some packages providing a string vector
```r
## Test it with a vector:
demo_vec <-
c(
"",
"DIZtools",
"data.table",
"joundso/mainzelliste-connector",
"miracum/misc-diztools@dev",
"# this_one_will_be_ignored"
)
requiRements::install(packages = demo_vec)
```### Install some packages providing a file containing the packagenames
```r
## Test it with a file:
demo_path <- "./data-raw/requirements.txt"
requiRements::install(path_to_requirements = demo_path)
```### Install some packages with a string AND a file
:bulb: Using the above defined variables `demo_string`, `demo_vec` and `demo_path`:
```r
## Test it with a string AND a file:
requiRements::install(packages = demo_string,
path_to_requirements = demo_path)## Test it with a vector AND a file:
requiRements::install(packages = demo_vec,
path_to_requirements = demo_path)
```### Supported syntax
| Platform | Syntax | Example |
| :--------------------------: | :------------------: | :------------------------------------------------------------------: |
| CRAN | `packagename` | `requiRements::install(packages = "data.table")` |
| GitHub | `user/repo-name` | `requiRements::install(packages = "joundso/mainzelliste-connector")` |
| GitHub with Branch/Reference | `user/repo-name@ref` | `requiRements::install(packages = "miracum/misc-diztools@dev")` |## :bulb: You can improve this package
- Missing some functionalities?
- Found a Bug?--> Feel free to create an [issue](https://github.com/joundso/requirements/issues) or (even better) a [pull request](https://github.com/joundso/requirements/pulls). :pray: Thanks in advance!
## More Infos
- About MIRACUM:
- About the Medical Informatics Initiative:
- Alternative solution: Package [`Require`](https://github.com/PredictiveEcology/Require)