R packages are collections of code which can be installed within R, and give extra functionality to R which is not included in the base package. They are written using a standard structure which includes code, documentation and tests. If you are new to R packages, it is recommended to start with this guide.