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

Using R Markdown and Shiny


In the previous chapter, we presented the Shiny framework of RStudio in detail. Besides building complete web applications, there is also the possibility of integrating entire Shiny applications into R Markdown documents and presentations. Since we have already learned all the basic functions of R Markdown, and the use and logic of Shiny, we will focus on the following lines of integrating a simple Shiny app into an R Markdown file.

In order for Shiny and R Markdown to work together, the argument, runtime: shiny must be added to the YAML header of the file. Of course, the RStudio IDE offers a quick way to create a new Shiny document presentation. Click on the new file, choose R Markdown, and in the popup window select Shiny from the left-hand side menu. In the Shiny menu, you can decide whether you want to start with a Shiny Document option or a Shiny Presentation option:

Shiny Document

After choosing the Shiny Document option, a prefilled .Rmd file opens. It is...