Best practice for guidance on "developer mode"?

The README file and pkgdown content usually contain all the information needed about how to use a package/shiny app as a User. But what if you want to take a look/contribute to something as a Developer? Is there a preferred way to provide this info? I find this to be a big challenge and would like to let future developers know what needs to be done so they can quickly get to work. I constantly have difficulty trying to figure out what needs to be done:

  • for packages, do I use renv::restore or devtools:install_dev_deps or.. ? And what OS packages do I need to install and how (e.g. sudo apt install qpdf)?
  • for a bookdown application (e.g. GitHub - hadley/adv-r: Advanced R: a book) which is not in a package structure, what do I need to install (OS packages and R packages) and how to best do so, in order to be able to render the book?
  • for Shiny apps: if not in a package structure, how best to install OS and R packages and successfully kick off the app within Posit Workbench?

I guess I am asking two questions:

  1. best way to let future developers know what is needed to get my package/shiny app/bookdown set up for Workbench?
  2. best way to figure out what to do with packages/shiny apps/bookdown, created by others, in order to get them set up in Workbench?

Thanks for any info. My current process when attempting to get Workbench set up when attempting to use packages/apps/bookdowns is to run, get an error related to OS/R packages, install, run again, repeat multiple times until I can finally get it successfully run. I am hoping this is a giant beginner mistake and that I have missed a Chapter 0 which would answer everything.

These are a lot of questions, I suggest skimming through the R packages book [1] for a workflow that many R developers at Posit use, and then ask more specific questions here, should you have any, still.

It does not cover how to install system packages on your chosen Linux distro, I suggest you consult the manuals of you distro for that.

I also suggest you use rig [2] for installing R, and pak [3] for installing R packages. pak will also tell you which system packages you need on many Linux distros, or it can even automatically install them, depending on your setup.

[1] https://r-pkgs.org/
[2] GitHub - r-lib/rig: The R Installation Manager
[3] All about installing pak. — Installing pak • pak

1 Like

@Gabor Thanks for the reply.

Yes, I should have divided this posting into two (or more) questions. I will close this and will post narrower and clearer questions.

This topic was automatically closed 7 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.