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
About the Authors
About the Reviewer


Data analysis, visualization, and the handling of complex statistical issues was reserved just for universities and very few organizations for a long time. In fact, an easy-to-use and free environment to make the concept of data analysis available to a broader audience was not available.

But in the early nineties, R saw the light of day, and since then, it has been on a meteoric rise. R has shaped the landscape of data science in recent years like no other programing language. Because of its open source nature, it became widely known and is often referred to as the lingua franca of data analysis. Another reason for this huge success is the availability of a sophisticated Integrated Development Environment (IDE) named RStudio.

The development of RStudio started in 2010, and now, it is the de facto, go-to IDE for everybody working with R. The mission statement of RStudio is "to provide the most widely used open source and enterprise-ready professional software for the R statistical computing environment."

But RStudio offers more than just a handy way to create R scripts; it grew to a real ecosystem by providing a variety of functionalities like package, application, interactive reporting creation, and more. Walking this way, RStudio has managed to bring data analysis to a broader audience. And because of its continuous desire to innovate R and its possibilities, it can be seen as a further development of the R language. RStudio combines the strong statistical power of R, the community, and open source spirit with cutting edge technologies of user interface development.

This made RStudio more than just a tool for statisticians; it became the platform for everybody who wants to generate insights from data and share them with others.

Therefore, we will hereafter guide you to develop, communicate, and collaborate with R by mastering RStudio.

What this book covers

Chapter 1, The RStudio IDE – an Overview, describes how to install RStudio, and gives a general overview of its user interface.

Chapter 2, Communicating Your Work with R Markdown, shows how to create R Markdown documents and presentations with the help of the concept of reproducible research.

Chapter 3, R Lesson I – Graphics System, gives an introduction to the landscape of plotting packages in R and the basic process of plot creation with different packages for interactive graphs.

Chapter 4, Shiny – a Web-app Framework for R, describes how to create web applications with the Shiny framework by explaining the basic concept of reactive programming.

Chapter 5, Interactive Documents with R Markdown, explains how to create interactive R Markdown documents with the Shiny framework and other R packages.

Chapter 6, Creating Professional Dashboards with R and Shiny, introduces the concept of dashboards, and how to build a professional dashboard with the shinydashboard package.

Chapter 7, Package Development in RStudio, describes the basic process of package development in R, and how to create R packages with RStudio.

Chapter 8, Collaborating with Git and GitHub, shows the fundamentals of Git and GitHub, and how to use them with RStudio.

Chapter 9, R for your Organization – Managing the RStudio Server, describes how to install R, RStudio, and the Shiny Server on a cloud server to create a fully flexible programming environment.

Chapter 10, Extending RStudio and Your Knowledge of R, explains where you can find additional resources to improve your work with R and RStudio.

What you need for this book

To fully apply the knowledge learned in this book, you will need a computer with access to the Internet, and the ability to install the R environment as well as the RStudio IDE. The first chapter will guide you through this process.

Who this book is for

This book is aimed at R developers and analysts who wish to work on R statistical development while taking advantage of RStudio's functionality to ease their development efforts. Experience with R programming is assumed, as well as being comfortable with R's basic structures and a number of functions.


In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "You can also export the analysis.R script as a report in the HTML, PDF, or MS Word format, and you will then find the report in your code folder."

A block of code is set as follows:

gaToken <- GoogleApiCreds(
                userName = "[email protected]",
                  client_id = "your client ID",
                  client_secret = "your client secret") 

save(gaToken, file = "auth/gaToken")

Any command-line input or output is written as follows:

$ sudo apt-key adv –keyserver –recv-keys E084DAB9

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Therefore, just click on the Publish button and RStudio will guide you through the process."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.


If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.