Chapter 7. Package Development in RStudio

This chapter covers:

  • Understanding the structure of R packages
  • Creating package projects with RStudio
  • Documenting your functions with R documentations files and roxygen2
  • Building and testing your package

Understanding R packages

Packages are the most important aspect of the R language to create reproducible code and analysis. They are collections of R functions, data, and compiled code in a very standardized way. This makes it very easy to share them across R users and add new elements from others to already installed packages to take your R analysis to the next level. These packages can help to solve many tasks with R without having to write every single line of code on your own. If you take machine-learning ...

Get Mastering RStudio – Develop, Communicate, and Collaborate with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.