- Package Structure
- Package Creation - Hands on
July 16, 2019
R packages are collections of functions and data sets developed by the community. They increase the power of R by improving existing base R functionalities, or by adding new ones.
A package is a suitable way to organize your own work and, if you want to, share it with others. Typically, a package will include code (not only R code!), documentation for the package and the functions inside, some tests to check everything works as it should, and data sets.
“I wish I'd left this code across scattered .R files instead of combining it into a package” said no one ever #rstats http://t.co/udeNH4T67H— David Robinson (@drob) June 19, 2015
Packages can be deployed basically everywhere. The most used ways to deploy Packages are:
The Structure of an R-package is usually divided in multiple Files and Folders. There are some Rules that we have to Follow when using a Package properly
Here is one Example from one of my own Packages:
To master package development, particularly when you’re distributing a package to others, it really helps to understand the five states a package can be in across its lifecycle: