简体   繁体   中英

roxygen2 not generating .Rd file

When I try to use roxygen2::roxygenize() in RStudio, I get an error message. The message I am coming across is this:

Warning message: trainModel.Rd not generated by roxygen2. Skipped.

I have tried so much to fix this, but it just won't get fixed unless I remove all of the #' comments out (which would remove the purpose of using roxygen2 in the first place). I even took out everything except for the parts describing the title, description, and details and the error still persists (which makes me imagine that the error is in one of those three parts. But how?). My other document's Rd file gets generated just fine, but this one does not. Can somebody please help?

Try deleting the current Rd file.

I replicated this warning by creating file with your function, roxygenizing the code, and then removing the lines from the resulting Rd file

% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/trainmode.R

It looks like roxygen2 doesn't want to overwrite files it didn't create. If you delete the current trainmode.Rd file, roxygen2 will generate a new .Rd file the next time roxygenize your code.

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