Overview

Working with other packages can mean:

Technical, legal, social, philosophical implications

General advice:

Depends, Imports, Suggests, Enhances: use one

Your package uses another installed package to do something:

Depends:

Imports:

Suggests:

Enhances:

Reference: Writing R Extensions, Section 1.1.3

NAMESPACE specification

Reference: Writing R Extensions, Section 1.5

Exports

  • Only exported functions are visible after library(mypkg) or via mypkg::
  • Unexported functions are available as mypkg:::
  • Suggestion:

    • start with default (export all, exportPattern("^[^\\.]")),
    • add @export-tags before release
    • don’t export hacks, functions you don’t document

Imports

Contributing to other packages

Ressources:

Using material from other packages in your own

We have to talk about licenses

Software licensing matters in research, same as data protection & citation rules.

Licensing R: not a legal document, but

Do I have to share?

Have fun