Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a package with devtools - throwing an error where "Author" and "Maintainer" fields are missing/empty despite being filled

In my DESCRIPTION file I have used the AUTHORS@R syntax to generate the Author and Maintainer fields, but in the R CMD Check process it keeps throwing an error message saying the fields are empty:

> checking for file 'bar/DESCRIPTION' ... ERROR
  Required fields missing or empty:
    'Author' 'Maintainer'

This was working previously so I don't know why it's not functioning now. I've saved the file, and rebuilt the pkg with "Clean and Rebuild". Alternatively I've tried filling the Author and Maintainer fields manually but that doesn't work either.

enter image description here

like image 668
Nautica Avatar asked Dec 21 '18 12:12

Nautica


2 Answers

You need to run R CMD build on the repo then R CMD check on the resulting tarball.

like image 189
Alex Avatar answered Oct 16 '22 01:10

Alex


A one liner which build and check the package.

R CMD BUILD . && R CMD CHECK $(ls -t . | head -n1)

a . means that sb already cd directory to the package one.
Both . (left and right) could be updated to PKGNAME if we are a one dir above.

like image 3
polkas Avatar answered Oct 16 '22 02:10

polkas