我正在为我正在开发的包使用小插图中的forcats和包中的函数。devtools我将它们列在NAMESPACE 文件的Suggests(not not ) 字段中。Imports
当我运行时devtools::check(),会返回以下注释:
checking for unstated dependencies in vignettes ... NOTE\n\'::\' or \':::\' imports not declared from:\n \xe2\x80\x98devtools\xe2\x80\x99 \xe2\x80\x98forcats\xe2\x80\x99\nRun Code Online (Sandbox Code Playgroud)\n\n根据Stack Overflow 上这个问题的答案,将这些添加到“建议”字段应该可以解决导致该注释的问题,但在这种情况下,这对我来说似乎不起作用。您能建议如何处理此说明吗?如果有帮助,这里有一个包的链接。
\n建议需要添加到您的描述文件中,而不是命名空间中
\n\ndplyrType: Package\nPackage: dplyr\nVersion: 0.7.4\nTitle: A Grammar of Data Manipulation\nDescription: A fast, consistent tool for working with data frame like objects,\n both in memory and out of memory.\nAuthors@R: c(\n person("Hadley", "Wickham", , "hadley@rstudio.com", c("aut", "cre")),\n person("Romain", "Francois", , "romain@r-enthusiasts.com", role = "aut"),\n person("Lionel", "Henry", role = "aut"),\n person("Kirill", "M\xc3\xbcller", role = "aut"),\n person("RStudio", role = c("cph", "fnd"))\n )\nURL: http://dplyr.tidyverse.org, https://github.com/tidyverse/dplyr\nBugReports: https://github.com/tidyverse/dplyr/issues\nEncoding: UTF-8\nDepends: R (>= 3.1.2)\nImports: assertthat, bindrcpp (>= 0.2), glue (>= 1.1.1), magrittr,\n methods, pkgconfig, rlang (>= 0.1.2), R6, Rcpp (>= 0.12.7),\n tibble (>= 1.3.1), utils\nSuggests: bit64, covr, dbplyr, dtplyr, DBI, ggplot2, hms, knitr, Lahman\n (>= 3.0-1), mgcv, microbenchmark, nycflights13, rmarkdown,\n RMySQL, RPostgreSQL, RSQLite, testthat, withr\nVignetteBuilder: knitr\nLinkingTo: Rcpp (>= 0.12.0), BH (>= 1.58.0-1), bindrcpp, plogr\nLazyData: yes\nLicense: MIT + file LICENSE\nRoxygenNote: 6.0.1\nNeedsCompilation: yes\nPackaged: 2017-09-16 15:25:52 UTC; muelleki\nAuthor: Hadley Wickham [aut, cre],\n Romain Francois [aut],\n Lionel Henry [aut],\n Kirill M\xc3\xbcller [aut],\n RStudio [cph, fnd]\nMaintainer: Hadley Wickham <hadley@rstudio.com>\nRepository: CRAN\nDate/Publication: 2017-09-28 20:43:29 UTC\nBuilt: R 3.4.2; x86_64-w64-mingw32; 2017-09-29 11:50:50 UTC; windows\nArchs: i386, x64\nRun Code Online (Sandbox Code Playgroud)\n\n查看您的链接后,我发现您的文件中有拼写错误,请正确地将项目从建议移至建议
\n\nSuggets: forcats,\n devtools\nEncoding: UTF-8\nLazyData: true\nRoxygenNote: 6.0.1\nSuggests: knitr,\n rmarkdown\nRun Code Online (Sandbox Code Playgroud)\n