4
votes

As the title says, I have a problem generating R package documentation with roxygen2. I am 99.9% positive to have prepared everything as explained here and here already. I know it is almost impossible to get an answer to a prime remote diagnosis-nono-case like this, but I have to give it a shot.

Here is what I see after using document()

> document()
Updating mypack documentation
Loading mypack 
Writing NAMESPACE
There were 7 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: fun1.Rd not generated by roxygen2. Skipped.
2: fun2.Rd not generated by roxygen2. Skipped.
...

It seems that I have installed devtools and roxygen2 correctly - no errors with that.

If it is of importance: I have several .R files with several functions inside, but all functions do have a description.

To make sure and verify a strange behaviour, I used the exact examples of both pages - those were skipped too. What could be wrong here? Wild guessing is okay at this point.

Thank you!

1

1 Answers

4
votes

This warning typically occurs because the .Rd files already exist in the man directory (did you create them manually, perhaps in an earlier version of your project?). roxygen2 doesn't replace them if they don't start with a line indicating they were auto-generated, along the lines of:

% Generated by roxygen2 (4.1.0): do not edit by hand

To solve this, delete the .Rd files in the man directory, then re-run document().