devtools::document/roxygenise will not work when installing.

I'm using RStudio 2023.09.0+463 to make a package, but on installing the package the documentation using devtools::document or roxygenise() will not run. I'm using the default "hello world" package which is created when you initiate a new package project from Rstudio.

The code in R/hello.R looks as so:

#' A header line for your package
#' @name hello
#' @description A simple function that prints a welcome Test10
#` @return Prints "Hello, world!"`
#' @examples
#' hello()
#' @export

hello <- function() {
  print("Hello, world!")
}

"Use devtools package functions if available" is checked in "Configure build tools" , but running "Install" will not produce roxygen2 type documentation.

If I check "Generate documentation with Roxygen" it will work, but only once. If modify and hit Install a second time nothing is generated, and looking in "Configure build tools" the Roxygen checkbox is now unchecked (I can't keep it checked).

I reinstalled roxygen2 and devtools already.

Any help would be appreciated. I tried using a old version of Rstudio and this seems to work fine.

Update I just rolled back a version of Rstudio and it works as expected. Looks like a bug?

1 Like

I am finding the same issue since updating to the most recent version of RStudio (2023.09.0 Build 463).

When I go to Tools > Project Options > Build Tools and then tick "Generate documentation with Roxygen" that the option doesn't stay ticked. Never had this issue with previous version of RStudio.

Good to know it's not just me. I forgot to say I'm using the Linux version, but it looks like I should report this as a bug.

Thanks for confirming!

Our apologies, this is indeed a bug affecting the saving of all project options in the RProj file in release 2023.09.0+463. We are in the process of issuing a patch 2023.09.1 that addresses this issue. You can follow this issue here: Project options are not getting saved · Issue #13757 · rstudio/rstudio · GitHub

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.