Search code examples
rbuildroxygen2r-package

R package building error


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.


Solution

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

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