Guidance for Developers: what's a Developer to do?

Is there a standard location to find documentation on how to get things set up in RStudio in order to work on an existing project as a developer?

(To reproduce this, start with a new installation of RStudio; I have used rocker/tidyverse.)

A simple example: the wonderful "R for Data Science" (R4DS) book. As a User, I would be making use of the pre-rendered book (https://r4ds.hadley.nz/). But what if I want to get into the content as a Developer, e.g. I want to suggest some changes with an issue/PR?

The first thing is to create a project in RStudio with git and pull down everything from GitHub (GitHub - hadley/r4ds: R for data science: a book). And then ... ? If I go to Build -> Render Book -> HTML Format, I get an error that a package (palmerpenguins) is not installed. If I install that, it gets further along until it errors due to another package not being available. I would like to avoid all of this up front and have the environment set up with everything necessary to render the book. I looked for a renv file; I don't see that anywhere. I tried devtools:install_dev_deps() and that installed everything needed for an error-free rendering.

My question: how would one know to use devtools_install_dev_deps()? And is this what I am expected to use? I only know about this function because of a large package I was previously working on as a developer. I have not found any mention in the R4DS documentation or its GitHub entry on how to set up the developer environment (maybe I missed it?).

I am hoping there is a standard location in quarto sites, R packages, shiny apps, etc. where a new developer can find:

  • how to install all needed packages (renv? devtools_install_deps? something else?)
  • any system software that needs to be installed, e.g. qpdf
  • anything else which the project requires in order for a developer to build, run the tests, etc.

Thanks for any guidance you can provide.

Hi @esimms999 -

The packages needed to build the book are listed in the DESCRIPTION file, which is the file format for R packages. So that's how you would know what needs to be installed for the book to build properly.

If you want to improve upon the build instructions, I'd first open an issue to see if the addition to Renv would be welcome and/or improving the README. The README already provides the commands on how to build the O'Reilly version of the book, so maybe an additional section could also be helpful.

Best,
Randy