R package building error

半世苍凉 提交于 2020-01-17 07:18:06

问题


I am trying to build an R package. I usually run the clean and rebuild command in Rstudio. I am now getting this error message:

==> 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.

The DESCRIPTION file is actually in the project folder and seems ok. It's a bit hard to provide a reproducible example because there are so many files in the project. Maybe someone has already seen this error.


回答1:


Turned out to be a missing escape character in the roxygencomments.

#' @name %==% instead of #' @name \%==\%



来源:https://stackoverflow.com/questions/40136527/r-package-building-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!