Question

I have a very large project with ~120 files with ~50 lines of documentation each. Roxygen2 is a lifesaver for documenting my code, but I've ran into some intractable problems with fixing broken documentation. When I run roxygenise from Rstudio, I get the following error.

==> roxygenize('.', roclets=c('rd', 'namespace'))

* checking for changes ... ERROR

Error : family requires a value

The message is fairly clear, but it's not clear which file it originates from. I have over 500 family tags in the project, so it's not easy to search them by hand and certainly isn't a long term solution.

Is there any way to localise a roxygen error to a specific file? I imagine this is possible by roxygenating each file in a loop, but I couldn't figure out how to do this.

Any help, incites or scripts would be appreciate, and if any clarification is needed leave a comment below.

Was it helpful?

Solution

If you are on a UNIX system or on windows with cygwin you can run:

grep -r -e "@family\s*$" ./

from the directory with your files. If not most text editors have a regex find in files option.

This doesn't guarantee a hit in case the problem is that your family tag is malformed as opposed to just missing, but will probably work. If it is the latter problem then you should start by what @BenBolker suggested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top