Book Image

Mastering RStudio: Develop, Communicate, and Collaborate with R

4 (1)
Book Image

Mastering RStudio: Develop, Communicate, and Collaborate with R

4 (1)

Overview of this book

RStudio helps you to manage small to large projects by giving you a multi-functional integrated development environment, combined with the power and flexibility of the R programming language, which is becoming the bridge language of data science for developers and analyst worldwide. Mastering the use of RStudio will help you to solve real-world data problems. This book begins by guiding you through the installation of RStudio and explaining the user interface step by step. From there, the next logical step is to use this knowledge to improve your data analysis workflow. We will do this by building up our toolbox to create interactive reports and graphs or even web applications with Shiny. To collaborate with others, we will explore how to use Git and GitHub and how to build your own packages to ensure top quality results. Finally, we put it all together in an interactive dashboard written with R.
Table of Contents (17 chapters)
Mastering RStudio – Develop, Communicate, and Collaborate with R
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Building and checking a package


As we have seen before, RStudio makes many steps very easy when we want to build our own R package. RStudio also helps us with the finalizing steps of our package. These include building and testing our package and we can find the necessary options to perform these tasks in the build menu of RStudio.

These do not just help us as the final steps, but we also have to build and load our package a lot during the development process. This is the only way we can test all the functions of our package. To test our package, we should stick to the following steps:

  1. Tweak our code and perform changes to our packages code base.

  2. Build our package.

  3. Install the package.

  4. Unload the package.

  5. Reload the package.

RStudio actually performs all these steps with the command Build and Reload.

We can see the output in the Build pane.

Checking a package

The Check Package function in the Build menu will check all dependencies of our package. This is very useful as it shows us exactly where errors...