5 Conclusion

Short Course: Good Software Engineering Practice for R Packages

Daniel Sabanés Bové

October 10, 2025

Disclaimer




Any opinions expressed in this presentation and on the following slides are solely those of the presenter and not necessarily those of their employers.

Thank you …

  • to you for your engagement and participation 🙏
  • to the SnB organizers to make this event possible 👏
  • to our fellow openstatsware authors of the course materials 📚

Temperature check

Enter slido.com: 2189872

Take away messages

R package structure

  • R package = folder structure with (many) conventions
  • With modern tools usethis, roxygen2 it is easy to start a new package
  • Packaging a set of functions is an ideal way to share with collaborators and the public
  • Start small and simple and over time you can learn additional options

Ensuring quality

  • Quality by Design: use a workable workflow:
    Idea \(\rightarrow\) Design docs \(\rightarrow\) Programming \(\rightarrow\) Quality check \(\rightarrow\) Publication
  • Apply common clean code rules:
    • Use clear names for functions and variables
    • Don’t repeat yourself!
    • Use styler to optimize the code styling
  • Write tests for your functions
    • Use testthat to test, test, and test
    • Use covr to improve the test coverage

Publication

  • pkgdown can help you easily create a nice website for your package
  • Versions and licenses along with NEWS updates are important
  • GitHub pages are a great way to present your package to the world
  • R-Hub helps with checking before CRAN submission
  • Bioconductor is a great alternative for omics packages

Possible next steps

  • Bring the information back to your colleagues in your organization
  • Start building your first own package and share internally first
  • Later publish it open source on GitHub and submit it to CRAN
  • Learn about more tips and tricks how to extend R

Photo by Pixabay on pexels.com

License information