The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Identify External Packages Used in a Project
Version: 0.3
Description: Screens all '.R', '.Rmd', and '.qmd' files to extract the name of packages used in a project. This package detects packages called with 'library(foo)', 'require(foo)', 'foo::bar()' and 'use("foo", "bar")' and adds these dependencies in the DESCRIPTION file in the sections Depends, Imports, and Suggests.
URL: https://github.com/frbcesab/rdeps
BugReports: https://github.com/frbcesab/rdeps/issues
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: cli, utils
NeedsCompilation: no
Packaged: 2025-04-23 08:07:14 UTC; nicolas
Author: Nicolas Casajus ORCID iD [aut, cre, cph]
Maintainer: Nicolas Casajus <nicolas.casajus@fondationbiodiversite.fr>
Repository: CRAN
Date/Publication: 2025-04-23 08:20:02 UTC

rdeps: Identify External Packages Used in a Project

Description

logo

Screens all '.R', '.Rmd', and '.qmd' files to extract the name of packages used in a project. This package detects packages called with 'library(foo)', 'require(foo)', and 'foo::bar()' and adds these dependencies in the DESCRIPTION file in the sections Depends, Imports, and Suggests.

Author(s)

Maintainer: Nicolas Casajus nicolas.casajus@fondationbiodiversite.fr (ORCID) [copyright holder]

See Also

Useful links:


Add required dependencies to the description file

Description

This function detects external packages used in an R project (package, compendium, website, etc.) and updates the sections Depends, Imports, and Suggests of the DESCRIPTION file.

A DESCRIPTION file can be created and added to an existing project with the function use_description() of the package usethis.

All .R, .Rmd, and .qmd files are screened to identify packages called by library(foo), library("foo"), library('foo'), require(foo), require("foo"), require('foo'), foo::bar() or use("foo", "bar").

Different types of dependencies are handled with the following rules:

This function also screens the NAMESPACE file (it detects packages mentioned as import(foo) and importFrom(foo,bar)) and ⁠@examples⁠ sections of roxygen2 headers. The detected packages are added in the Imports section of the DESCRIPTION file.

If the project is not an R package, non-standard folders are also screened (i.e. ⁠analyses/⁠, ⁠paper/⁠, etc.). The detected packages are added in the Imports section of the DESCRIPTION file.

Usage

add_deps()

Value

No return value.

Examples

## Not run: 
add_deps()

## End(Not run)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.