尝试R使用roxygen2和构建我的第一个包devtools。我在该部分添加了一个使用%>%和的函数。当我运行它时失败,因为它找不到函数或.mutate@examplescheck()%>%mutate
我有#' importFrom magrittr %>%和#' importFrom dplyr mutate在函数的.R文件中。我也有magrittr和dplyr下Imports:的DESCRIPTION文件。运行后document(),我的NAMESPACE文件包含importFrom(dplyr,mutate)和importFrom(magrittr,"%>%").
最小R/test.R文件:
#' Conditional mutate
#'
#' \code{mutate_cond} mutates the \code{data.frame} only on the rows that
#' satisfy the condition.
#'
#' @param .data \code{data.frame}
#' @param condition expression …Run Code Online (Sandbox Code Playgroud)