Skip to content

attachment

1.2.0Package record

Deal with Dependencies

3packages dependsuggested by 2
57.5Kdownloads / year
96.0%test coverage
13/13flavors OK

Overview

About

Manage dependencies during package development. This can retrieve all dependencies that are used in ".R" files in the "R/" directory, in ".Rmd" files in "vignettes/" directory and in 'roxygen2' documentation of functions. There is a function to update the "DESCRIPTION" file of your package with 'CRAN' packages or any other remote package. All functions to retrieve dependencies of ".R" scripts and ".Rmd" or ".qmd" files can be used independently of a package development.

Changes in 1.2.0

Bug fixes

  • att_amend_desc() no longer writes nearly every dependency out of DESCRIPTION when the package carries a Depends: entry other than R that the code scan no longer finds. The guard around that branch tested the *column* count of a data frame, so it held even with no row kept, and the branch then took the complement of an empty selection with x[-which(...), ], which in R keeps nothing rather than everything. On a package with eleven declared dependencies, two survived. The only visible trace was a message reading Package(s) is(are) in category 'Depends' with an empty list. The guard now counts rows, and the complement is taken by negating the logical test, which is correct on an empty frame instead of correct by accident (#146).
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
  • att_from_rscript() (and therefore att_amend_desc()) no longer reports a variable name as a package name. requireNamespace(), loadNamespace() and the ns argument of getFromNamespace() take a character string, so a bare symbol there can only be a variable holding the name, never the name itself; the same goes for library() and require() when the call passes character.only = TRUE. A guard such as for (pkg in c("callr", "jsonlite")) requireNamespace(pkg, quietly = TRUE) used to add a package literally called pkg to DESCRIPTION, which then stopped every renv / pak install on a package that cannot exist. A symbol is still read as the package name for library(), require() and use(), which compute on the unevaluated argument (#143).
  • Named arguments of a dependency-introducing call are now matched the way R matches them, by exact name first and then by a prefix unambiguous among the formals, instead of by string equality. An abbreviated but perfectly legal spelling of the flag, library(pkgvar, char = TRUE), went unrecognised and added a package named after the variable; and an abbreviated package argument, library(pack = "jsonlite"), was missed altogether. The formals are read from the running R rather than written down here, and a formal placed after ... is matched by its exact name only, which is R's own rule (#143).
  • att_amend_desc() no longer lets an Enhances version constraint override the Imports one for the same package. The rule that picks a version when a package is pinned under two types ordered the type as text, and "Enhances" sorts before "Imports", so Enhances: pkg (>= 9.9.9) replaced Imports: pkg (>= 2.0.0) and wrote a bound nobody had set for that type, which can make a package uninstallable. The precedence is now named explicitly, strongest first: Imports, Depends, LinkingTo, Suggests, Enhances.
  • att_amend_desc() no longer counts a removal twice, nor names the package twice, when DESCRIPTION lists it under two dependency types. The list read by the comparison holds one row per (type, package) pair, so a package pinned under both Imports and Suggests produced [-] 2 package(s) removed: pkgA, pkgA for a single removal.

New features

  • att_amend_desc() never drops a version constraint set by hand in DESCRIPTION. A package that no scanned source mentions used to be removed and its constraint to go with it, and a package listed in pkg_ignore used to be removed too, although pkg_ignore means "do not infer this from code" and not "delete what I wrote". Such an entry is now kept as declared, with its type and its version, and reported so the decision is visible. Widening dir.r makes it a detected dependency again; removing its constraint lets it go. A **bare** entry, with no version, is still removed: there is nothing to lose, and pkg_ignore stays usable for cleaning a wrong entry out. An Imports kept this way while no code uses it draws All declared Imports should be used from R CMD check, which reports a real defect of the package being amended that dropping the pin used to conceal (#139).

Maintenance

  • The test suite reads lockfiles with renv::lockfile_read() instead of reaching into renv with getFromNamespace("lockfile", "renv"), which stopped working when renv 1.2.4 changed that internal. renv moves from Suggests: renv (>= 0.8.4) to renv (>= 1.0.0), the version that introduced the public lockfile functions.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-10-17
  • WARNING12 OK, 1 WARNING2026-10-01
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.2.0
READMEYes · 761 wordsVignettesYes · 4 · dynamicNEWSYes · 100% structured · mentions 1.2.0Citation fileNoWebsiteYes · pkgdown
Help pages
20 (4 internal)includes a package overview page
Examples that run
81%13 run in a plain check · 3 never run
Exported functions with examples
84%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

57.5K
CRAN downloads in the past year
Rank #1,938 · ~158/day · ~4.8K/mo
Daily download trend is not available in this view yet.
3.6K30 days
9.8K90 days
57.5K1 year
Compare downloads with other packages →
Also on338 r2u45 autocran1.2K conda_forge

Repository

111Stars
14Forks
3Open issues
1Open PRs
20Releases
369Commits
12Commit identities
hacktoberfestrr-packagerstats
369 commits · Last activity 2026-09-30 · 0% stars, 30d · The default branch showed an older version (1.1.1) than CRAN on 2026-10-22
Responsiveness
How these are sampled
PRs merged (all time)
86%
Median days to close, 50 most recently updated closed issues
40
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-08-25 · 1102026-07-07 · 111
PracticesBeta

11 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/thinkr-open/attachment on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conductContributing guide
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-30 · The repository has a site deploy workflow

pkgdown site last built 2026-09-30

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 2 practices
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-04-19
    Pull request: opened by its own account
  • Claude Codefirst seen 2026-04-24
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
    Named in .gitignore: .claude
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
14 external dependencies (excludes base and recommended)

Installing attachment adds 45 packages (24 with compiled code, 32 MB of source tarballs). Heaviest: stringi 11 MB, bslib 5.6 MB, sass 2.9 MB.

Depends (1)
R >= 3.4
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
3direct
0indirect
Imports 3
Suggested by 2
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (5)
Maintainer since 0.4.3 (2025), Author
Author · added in 0.4.0
Author · added in 0.4.0
Author
previous maintainer
Copyright holder, Funder

Previously maintained by Sébastien Rochette (0.2.0 to 0.4.2) and Vincent Guyader (0.0.9 to 0.1.0).

Releases (18)

Pick two releases to compare their code metrics.

Show 12 earlier eventsHide 12 earlier events
  • archivedRemoved from CRAN
    2022-09-08
    check problems were not corrected in time
  • 0.2.5
    record
    2022-05-15 · diff ↗ ·
    added 2 exports
    create_renv_for_dev, create_renv_for_prod
  • R
    R 4.2.0 released · 2022-04-22
  • 0.2.4
    record
    2021-11-16 · diff ↗
  • 0.2.3
    record
    2021-11-10 · diff ↗ ·
    added 1 export
    set_remotes_to_desc
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.1
    record
    2021-01-21 · diff ↗
  • 0.2.0
    record
    2021-01-19 · diff ↗ ·
    added 1 export
    find_remotes
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.0
    record
    2020-03-15 · diff ↗ ·
    added 3 exports
    att_amend_desc, att_to_desc_from_is, att_to_desc_from_pkg
  • 0.0.9
    record
    2019-05-05
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2019-05-05
Total releases
18 / 7 yrs
License
GPL-3 OSI
Minimum R
≥ 3.4
Download size
223 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("attachment")
Guyader, V., ThinkR, Delmotte, M., Floc'hlay, S., & Rochette, S. (2026). attachment: Deal with Dependencies (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.attachment

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for attachment version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy