Skip to content

Require

Installing and Loading R Packages for Reproducible Workflows

v1.0.1 · Aug 17, 2024 · GPL-3

Description

A single key function, 'Require' that makes rerun-tolerant versions of 'install.packages' and `require` for CRAN packages, packages no longer on CRAN (i.e., archived), specific versions of packages, and GitHub packages. This approach is developed to create reproducible workflows that are flexible and fast enough to use while in development stages, while able to build snapshots once a stable package collection is found. As with other functions in a reproducible workflow, this package emphasizes functions that return the same result whether it is the first or subsequent times running the function, with subsequent times being sufficiently fast that they can be run every time without undue waiting burden on the user or developer.

Downloads

2K

Last 30 days

2894th

3.3K

Last 90 days

12.5K

Last year

Trend: +308.4% (30d vs prior 30d)

CRAN Check Status

2 ERROR
9 NOTE
3 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang NOTE
r-devel-linux-x86_64-fedora-gcc NOTE
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 ERROR
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 NOTE
r-release-linux-x86_64 NOTE
r-release-macos-arm64 NOTE
r-release-macos-x86_64 NOTE
r-release-windows-x86_64 NOTE
Check details (13 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-debian-gcc

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-fedora-clang

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-fedora-gcc

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-macos-arm64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
ERROR r-devel-macos-arm64

tests

Running ‘testthat.R’ [3s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(Require)
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:Require':
  
      setup
  
  > test_check("Require")
  Saving _problems/test-00pkgSnapshot_testthat-16.R
  Saving _problems/test-01packages_testthat-36.R
  Saving _problems/test-04other_testthat-19.R
  Saving _problems/test-04other_testthat-26.R
  [ FAIL 4 | WARN 0 | SKIP 7 | PASS 39 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (3): 'test-05packagesLo
...[truncated]...
estthat.R:26:3'): test 4 ──────────────────────────────
  Error in `rbindlist(l, use.names, fill, idcol, ignore.attr)`: Item 2 has 17 columns, inconsistent with item 1 which has 18 columns. To fill missing columns use fill=TRUE.
  Backtrace:
       ▆
    1. └─Require::pkgDep("data.table", purge = FALSE) at test-04other_testthat.R:26:3
    2.   └─Require:::getPkgDeps(...)
    3.     └─Require:::getDeps(...)
    4.       └─Require:::getDepsNonGH(...)
    5.         └─Require:::pkgDepCRAN(...)
    6.           └─Require:::joinToAvailablePackages(...)
    7.             └─Require:::available.packagesCached(...)
    8.               ├─base::do.call(rbind, cap)
    9.               └─base (local) `<fn>`(binary = `<dt[,18]>`, source = `<dt[,17]>`)
   10.                 └─data.table (local) rbind(deparse.level, ...)
   11.                   └─data.table::rbindlist(l, use.names, fill, idcol, ignore.attr)
  
  [ FAIL 4 | WARN 0 | SKIP 7 | PASS 39 ]
  Error:
  ! Test failures.
  Execution halted
NOTE r-devel-windows-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    'Require2.R' 'helpers.R' 'pak.R' 'pkgDep3.R'
ERROR r-devel-windows-x86_64

tests

Running 'testthat.R' [299s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(Require)
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:Require':
  
      setup
  
  > test_check("Require")
  Saving _problems/test-00pkgSnapshot_testthat-16.R
  Saving _problems/test-01packages_testthat-36.R
  Saving _problems/test-04other_testthat-19.R
  Saving _problems/test-04other_testthat-26.R
  [ FAIL 4 | WARN 0 | SKIP 7 | PASS 39 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • empty test (4): 'test-07pkgSnapsh
...[truncated]...
estthat.R:26:3'): test 4 ──────────────────────────────
  Error in `rbindlist(l, use.names, fill, idcol, ignore.attr)`: Item 2 has 17 columns, inconsistent with item 1 which has 18 columns. To fill missing columns use fill=TRUE.
  Backtrace:
       ▆
    1. └─Require::pkgDep("data.table", purge = FALSE) at test-04other_testthat.R:26:3
    2.   └─Require:::getPkgDeps(...)
    3.     └─Require:::getDeps(...)
    4.       └─Require:::getDepsNonGH(...)
    5.         └─Require:::pkgDepCRAN(...)
    6.           └─Require:::joinToAvailablePackages(...)
    7.             └─Require:::available.packagesCached(...)
    8.               ├─base::do.call(rbind, cap)
    9.               └─base (local) `<fn>`(binary = `<dt[,18]>`, source = `<dt[,17]>`)
   10.                 └─data.table (local) rbind(deparse.level, ...)
   11.                   └─data.table::rbindlist(l, use.names, fill, idcol, ignore.attr)
  
  [ FAIL 4 | WARN 0 | SKIP 7 | PASS 39 ]
  Error:
  ! Test failures.
  Execution halted
NOTE r-patched-linux-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-linux-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-macos-arm64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-macos-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-windows-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    'Require2.R' 'helpers.R' 'pak.R' 'pkgDep3.R'

Check History

ERROR 3 OK · 10 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-debian-gcc

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-fedora-clang

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-linux-x86_64-fedora-gcc

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-devel-macos-arm64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
ERROR r-devel-windows-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    'Require2.R' 'helpers.R' 'pak.R' 'pkgDep3.R'
NOTE r-patched-linux-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-linux-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-macos-arm64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-macos-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘Require2.R’ ‘helpers.R’ ‘pak.R’ ‘pkgDep3.R’
NOTE r-release-windows-x86_64

DESCRIPTION meta-information

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    'Require2.R' 'helpers.R' 'pak.R' 'pkgDep3.R'

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies data.table sys SpaDES.core Require

Version History

new 1.0.1 Mar 10, 2026
updated 1.0.1 ← 1.0.0 diff Aug 17, 2024
updated 1.0.0 ← 0.3.1 diff Jul 26, 2024
updated 0.3.1 ← 0.3.0 diff May 21, 2023
updated 0.3.0 ← 0.2.6 diff Mar 14, 2023
updated 0.2.6 ← 0.2.5 diff Jan 4, 2023
updated 0.2.5 ← 0.1.4 diff Nov 23, 2022
updated 0.1.4 ← 0.1.2 diff Oct 6, 2022
updated 0.1.2 ← 0.0.13 diff Sep 22, 2022
updated 0.0.13 ← 0.0.12 diff May 30, 2021
updated 0.0.12 ← 0.0.10 diff May 25, 2021
updated 0.0.10 ← 0.0.9 diff Dec 1, 2020
updated 0.0.9 ← 0.0.8 diff Nov 29, 2020
updated 0.0.8 ← 0.0.7 diff Sep 9, 2020
updated 0.0.7 ← 0.0.6 diff Aug 17, 2020
updated 0.0.6 ← 0.0.5 diff Aug 10, 2020
updated 0.0.5 ← 0.0.4 diff Jul 16, 2020
new 0.0.4 Jun 4, 2020