27.4 Writing R packages

It is not too difficult to create your own R package. See, for example, here:

https://support.posit.co/hc/en-us/articles/200486488-Developing-Packages-with-the-RStudio-IDE