When running R CMD check on an R package I often see the following message stating that the INDEX is not up to date:

* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking whether ‘INDEX’ is up-to-date ... NO
* use ‘--force’ to remove the existing ‘INDEX’
* installing the package to re-build vignettes
* creating vignettes ... OK 

This does not result in an a Warning, Error or even a Note. I assume this is referring to the INDEX file in the top level of the package directory? How do I "use --force"? I've tried adding --force as a argument while building or checking and it just complains that it is not recognized. Is there an R command to rebuild the INDEX file?

1

There are 1 best solutions below

1
On

Doh, of course I figured it out soon after posting. This still may be a useful question for other people since I didn't find relevant google hits:

It appears that if the --force argument should be given to R CMD build (not INSTALL or check) forcing the INDEX file to be deleted and regenerated. Also found the R function that generates the INDEX file:

tools::Rdindex("man/",outFile="INDEX")