我正在尝试构建一个R包。我通常在Rstudio中运行clean和rebuild命令。我现在得到这个错误信息:
==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
Updating ED2io documentation
Loading ED2io
Deleting grapes-equals-grapes.Rd
Writing NAMESPACE
Documentation completed
==> R CMD INSTALL --preclean --no-multiarch --with-keep.source EDio
* installing to library ‘/opt/local/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
* installing *source* package ‘ED2io’ ...
** R
** preparing package for lazy loading
No man pages found in package ‘ED2io’
** help
Error in .get_package_metadata(dir, FALSE) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
ERROR: installing Rd objects failed for package ‘ED2io’
* removing ‘/opt/local/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ED2io’
Exited with status 1.
DESCRIPTION
文件实际上在项目文件夹中,看起来没问题。提供一个可重现的示例有点困难,因为项目中有很多文件。
原来是roxygen
注释中缺少的转义字符。
#' @name %==%
代替#' @name %==%