Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anthonynorth/using

Add optional version constraints to R library() calls
https://github.com/anthonynorth/using

Last synced: 8 days ago
JSON representation

Add optional version constraints to R library() calls

Awesome Lists containing this project

README

        



release


lifecycle


build

using


Add version constraints and remote git repositories to library() calls.
In interactive mode the user is prompted to install.

## Installation

```r
remotes::install_github("anthonynorth/using@*release")
```

## Usage

Using is intended for use without being attached via `library(using)`. This
helps with detecting dependency declarations for [`capsule`](https://github.com/milesmcbain/capsule) or [`renv`](https://github.com/rstudio/renv/).

```r
using::pkg(capsule)
using::pkg(dplyr, min_version = "0.8.0")
using::pkg(h3jsr, min_version = "1.0.0", repo = "https://github.com/obrl-soil/h3jsr")
```

## Interactive use

In interactive sessions the user will be prompted to install a qualifying version of the package if one can be found at `repo` or CRAN if repo is missing.

```
> using::pkg("rdeck", min_version = "0.2.5", repo = "http://github.com/anthonynorth/rdeck")
A suitable version of package {"rdeck"} was not found. Would you like to install now?

1: yes
2: no

Selection: 1
Cloning into 'C:\Users\msmcbain\AppData\Local\Temp\RtmpgduuhY/3327d724-3531-412e-b21b-c7a1621e13d7'...
```