Skip to content

Move all packages from Depends to Imports #22

@arilamstein

Description

@arilamstein

When you run R CMD CHECK you get this NOTE:

N checking package dependencies (3.4s)
Depends: includes the non-default packages:
'codec', 'strtools', 'packtools', 'vartools', 'funtools',
'difftools', 'dplyr', 'lubridate', 'readr', 'readxl', 'rpivotTable',
'data.table', 'digest', 'downloader', 'glue', 'lazyeval', 'purrr',
'stringr', 'tibble', 'tidyselect'
Adding so many packages to the search path is excessive and importing
selectively is preferable.

Depends is somewhat dangerous, because forces the package to be loaded. This means that if someone is working locally, they might have their existing function / data names overridden when they load your package. Even worse, we don't control the packages we are loading. So after a call to update.packages(), people might get different results when they reload the package.

Fixing this, I believe, requires us to first fix #21. The reason is that if we move something from Depends to Imports now, and our namespace does not declare a specific importFrom call in the NAMESPACE file, R CMD CHECK will create a fatal error and crash. So we must first ensure that we are explicitly importing all necessary functions from each package. Then we can move the packages to Imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    checkNecessary to pass R CMD CHECK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions