roxygen2 not generating .Rd file

点点圈 提交于 2019-12-11 02:41:39

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/31866898/roxygen2-not-generating-rd-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!