我正在记录一个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)
我非常感谢你的帮助。非常感谢。