MyNixOS website logo
Description

Helper Package to Install Packages for R.

Helper function to install packages for R using an external 'requirements.txt' or a string containing diverse packages from several resources like Github or CRAN.

requiRements

codecov CRAN Status Badge CRAN Checks

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:

install.packages("requiRements")

The development version can be installed using

install.packages("devtools")
devtools::install_github("joundso/requirements", ref = "development")

Basic functions

Install some packages providing a single string

## 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

## 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

## 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:

## 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

PlatformSyntaxExample
CRANpackagenamerequiRements::install(packages = "data.table")
GitHubuser/repo-namerequiRements::install(packages = "joundso/mainzelliste-connector")
GitHub with Branch/Referenceuser/repo-name@refrequiRements::install(packages = "miracum/misc-diztools@dev")

:bulb: You can improve this package

  • Missing some functionalities?
  • Found a Bug?

--> Feel free to create an issue or (even better) a pull request. :pray: Thanks in advance!

More Infos

Metadata

Version

0.0.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows