使用未作为插图中示例的一部分导入的包

2023-12-14

我正在使用来自的函数forcats and devtools我正在开发的包的小插图中的包。我已将它们列在Suggests(不是这样的Imports) NAMESPACE 文件中的字段。

当我跑步时devtools::check(),返回以下NOTE:

checking for unstated dependencies in vignettes ... NOTE
'::' or ':::' imports not declared from:
  ‘devtools’ ‘forcats’

根据答案这个问题在 Stack Overflow 上,将这些添加到“建议”字段应该可以解决导致该注释的问题,但在本例中这对我来说似乎不起作用。您能建议如何处理此说明吗?如果有帮助,包的链接是here.


The Suggests需要添加到您的描述文件,不是命名空间

示例来自dplyr

Type: Package
Package: dplyr
Version: 0.7.4
Title: A Grammar of Data Manipulation
Description: A fast, consistent tool for working with data frame like objects,
    both in memory and out of memory.
Authors@R: c(
    person("Hadley", "Wickham", , "[email protected]", c("aut", "cre")),
    person("Romain", "Francois", , "[email protected]", role = "aut"),
    person("Lionel", "Henry", role = "aut"),
    person("Kirill", "Müller", role = "aut"),
    person("RStudio", role = c("cph", "fnd"))
    )
URL: http://dplyr.tidyverse.org, https://github.com/tidyverse/dplyr
BugReports: https://github.com/tidyverse/dplyr/issues
Encoding: UTF-8
Depends: R (>= 3.1.2)
Imports: assertthat, bindrcpp (>= 0.2), glue (>= 1.1.1), magrittr,
        methods, pkgconfig, rlang (>= 0.1.2), R6, Rcpp (>= 0.12.7),
        tibble (>= 1.3.1), utils
Suggests: bit64, covr, dbplyr, dtplyr, DBI, ggplot2, hms, knitr, Lahman
        (>= 3.0-1), mgcv, microbenchmark, nycflights13, rmarkdown,
        RMySQL, RPostgreSQL, RSQLite, testthat, withr
VignetteBuilder: knitr
LinkingTo: Rcpp (>= 0.12.0), BH (>= 1.58.0-1), bindrcpp, plogr
LazyData: yes
License: MIT + file LICENSE
RoxygenNote: 6.0.1
NeedsCompilation: yes
Packaged: 2017-09-16 15:25:52 UTC; muelleki
Author: Hadley Wickham [aut, cre],
  Romain Francois [aut],
  Lionel Henry [aut],
  Kirill Müller [aut],
  RStudio [cph, fnd]
Maintainer: Hadley Wickham <[email protected]>
Repository: CRAN
Date/Publication: 2017-09-28 20:43:29 UTC
Built: R 3.4.2; x86_64-w64-mingw32; 2017-09-29 11:50:50 UTC; windows
Archs: i386, x64

Update

查看您的链接后,我发现您的文件中有一个拼写错误,请正确地将项目从Suggets to Suggests

Suggets: forcats,
    devtools
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Suggests: knitr,
    rmarkdown
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用未作为插图中示例的一部分导入的包 的相关文章

随机推荐