Preliminary development of R documentation

I am writing my first R-package using devtools and roxygen2 in the RStudio IDE. The problem I have is with the preview of the .Rd files that I get when I "oxygenate" .R files. I use devtools::document() to get .Rd files, but when I try to view the help pages by writing any of them:

 help("FunctionName") ?FunctionName 

the message "Using development documentation for ..." is displayed on the console, but there is an empty space in the help window. Using devtools:load_all() causes the same problem. This may be due to the way devtools loads the package into the environment, but neither the R-Extensibility Writing document (which should not be handled to use roxygen ), nor the Hadley Wickham R-Book book provides a working solution.

+12
r documentation roxygen2 devtools
source share
1 answer

In Rstudio, in the project settings, there is generated documentation with the roxygen element - check this.

enter image description here

Then click Configure ... and check the boxes as follows:

enter image description here

Now, every time you press Ctrl + Shift + B, your documents will be rebuilt, and you can view them by clicking on the function name and pressing the F1 key or by entering one of the following lines in the console:

 ?my_function help(my_function) 
+1
source share

All Articles