简体   繁体   中英

Roxygen2 skipps .Rd generation

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!

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() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM