我正在记录一个 R 函数。我的 R 文件的结构如下:
#'Report the modeling result
#'
#' @param higher_rank A string.
#' @param lower_rank A string.
#' @param method A string.
#' @return modeling result of the accumulation of \code{lower_rank} of a \code{higher_rank} by \code{method}
#' @import data.table
#' @import ggplot2
#' @import drc drm
#' @importFrom plotly ggplotly
#'@examples
#'\dontrun{
#'modelit("adult", "child", "logistic")
#'}
#'@export
modelit <- function(higher_rank, lower_rank, method) {
...
...
model.drm <- drc::drm(lower_rank ~ higher_rank, data = data.frame(adults = adults, children = children), fct = MM.2())
...
...
}
当我跑
>devtools::document()
弹出一个错误:
Warning messages:
1: In loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘drm’
2: character(0)
3: character(0)
4: In loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘drm’
由于我没有包 drm 但 drc,我很好奇这个警告来自哪里。在命名空间中,我确实看到了
importFrom(drm,drc)
我非常感谢您的帮助。谢谢你。