I'm a maintainer of a CRAN package and get the following messages when loading:
* checking whether package ‘qdap’ can be installed ... [10s/10s] WARNING
Found the following significant warnings:
Warning: replacing previous import ‘annotate’ when loading ‘NLP’
Warning: replacing previous import ‘rescale’ when loading ‘scales’
Because I use the plotrix and scales packages as well as the NLP and ggplot packages. They have the functions rescale
and annotate
in common. This results in a significant warning with the latest CRAN check. So I decide to "fix" it.
I made the description something like this:
Package: qdap
Type: Package
Title: Bridging the gap between qualitative data and quantitative analysis
Version: 1.0.0
Date: 2013-06-26
Author: Tyler Rinker
Maintainer: Tyler Rinker <tyler.rinker@gmail.com>
Depends:
R (>= 3.0.0),
ggplot2 (>= 0.9.3.1),
gdata,
grid,
Imports:
NLP,
openNLP,
plotrix,
scales,
LazyData: TRUE
Description: Stuff
License: GPL-2
And added this to some .R files:
#' @import ggplot2 gridExtra RColorBrewer
#' @importFrom scales alpha
But this results in another warning:
* installing *source* package 'qdap' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: replacing previous import 'rescale' when loading 'scales'
Warning: replacing previous import 'annotate' when loading 'NLP'
Warning: replacing previous import 'alpha' when loading 'scales'
How do I use roxygen2
's importFrom
tag correctly?
I have read: https://github.com/hadley/devtools/wiki/Namespaces
But I learn best from an example where someone had to do this. I'm unsure of how to format the DESCRIPTION file correctly as well as the use of roxygen2
tags to avoid:
* checking whether package ‘qdap’ can be installed ... [10s/10s] WARNING
Found the following significant warnings:
Warning: replacing previous import ‘annotate’ when loading ‘NLP’
Warning: replacing previous import ‘rescale’ when loading ‘scales’
Here is the qdap GitHub Repo