johann-wagner / DS4B-final-project

Repo for BIOL3207 - Data Science for Biologists - Final Project
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

engineeRing best practices #13

Open fredjaya opened 1 year ago

fredjaya commented 1 year ago

~Some~ Most of this is beyond the assessment, but very useful if you want to publish your app later (licences permitting). Some things related to #11.

App structure

In addition to the specific guidelines for the report, the files can be refactored according to an R package, like the one outlined here and here. It looks like it's useful to follow an R package structure if you have a lot of custom functions. To refactor:

R function style guide

Good to adhere to the tidyverse style guide for formatting function .R files. Things to decide are whether you want one file with one function, or have one file with multiple related functions. See the organisation principles.

Also have a look at those example .R scripts, particularly how they format the docstrings - i.e. the documentation at the top of an R file that starts with #' ....