我是 CRAN 包的维护者,在加载时收到以下消息:
* 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’
因为我使用 plotrix 和 scales 包以及 NLP 和 ggplot 包。它们具有功能rescale
和annotate
共同点。这会导致最新的 CRAN 检查出现严重警告。所以我决定“修复”它。
我做了这样的描述:
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
并将其添加到一些 .R 文件中:
#' @import ggplot2 gridExtra RColorBrewer
#' @importFrom scales alpha
但这会导致另一个警告:
* 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'
如何正确使用roxygen2
'simportFrom
标签?
我已阅读:https ://github.com/hadley/devtools/wiki/Namespaces
但我从一个必须这样做的例子中学到了最好的东西。我不确定如何正确格式化DESCRIPTION文件以及使用roxygen2
标签来避免:
* 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’