Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

roxygen2 not creating .Rd documentation

I am unable to generate .Rd documentation files for my package using RStudio and Roxygen2. First, let me mention that I have gone through similar problems posted here and have already done the following:

  1. Roxygen2 blocks initiated at the beginning of file with a #'

  2. Configured Build Tools>Checked generate documentation with Roxygen> Configure > Checked all fields under 'Use roxygen to generate' and 'Automatically roxygenize when running'

  3. Made sure there were no .Rd files in the 'man' folder

And even after that, when I perform a 'Build and Reload' on RStudio I get the following output (please note the line that reads: No man pages found in package MYPACKAGE:

= => devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) >

Updating MYPACKAGE documentation Loading MYPACKAGE Documentation completed

==> Rcmd.exe INSTALL --no-multiarch --with-keep.source MYPACKAGE

  • installing to library C:/Users/user/Documents/R/win-library/3.3
  • installing source package 'MYPACKAGE' ... ** R ** data * moving datasets to lazyload DB ** preparing package for lazy loading No man pages found in package 'MYPACKAGE' ** help * installing help indices ** building package indices ** testing if installed package can be loaded
  • DONE (MYPACKAGE)

Edit: Upon further investigation, it appears that this was caused by the fact that I have sub-directories within my R directory, which is not supported by default. A possible solution was located here which, however, I haven't yet tried out. I will report back with the outcome as soon as I am able to perform the tests.

like image 208
chainD Avatar asked Mar 04 '17 07:03

chainD


1 Answers

I had the same error. roxygen2 was creating correctly the md files in the /man directory but they were not found at compilation time. I had the following error.

No man pages found in package 

After a bit of time I found that in one of the R file I had a source statement

source("C:/Users/vaulot/Google Drive/Scripts/R library/dv_function_pr2.R") 

My guess is that there was some code in the source file interfering with roxygen2.

like image 68
Daniel Avatar answered Oct 12 '22 12:10

Daniel