8

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.

1
  • RStudio settings Tools => Projects => Build-Tools: Generate documentatio... is set? Commented Mar 9, 2017 at 14:47

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.