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 packages with RStudio


RStudio combines the power of devtools with its GUI, which makes the development of your own packages very easy and manageable with just a few clicks.

Creating a new package project with RStudio

To create a new package with RStudio, just click on File | New Project... and select New Directory.

Then you can select R Package from the upcoming menu:

Now you have to set the necessary parameters for your R package. These include the type of the package, the package name, the option to create a package based on source files, and to create the package project as a subdirectory of another directory.

Furthermore, you can check the options for creating a Git repository or for using Packrat with your project.

If you want to create a package just containing R code, you should select the type to be Package. However, if you want to create a package that also uses C++ code, you should choose Package w/ Rcpp as it automatically sets up all necessary dependencies for using the Rcpp...