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

Getting started with R Markdown in RStudio

Let's recapitulate, that R Markdown uses various technologies and is seamlessly embedded in RStudio.

Creating your first R Markdown document

To create an R Markdown document, perform the following steps:

  1. First, click on the new file icon in RStudio and select R Markdown....

  2. This will open a new popup window where you can adjust a variety of settings.

  3. For our first document, we will leave all these settings as they are. You may change the Title and the Author name.

  4. After hitting the OK button, RStudio will automatically open a new prefilled .Rmd file.

  5. For a first test run, just click on the Knit HTML button with the small ball of yarn icon before the corresponding text.

    As you can see, the knitted file opens by default in a preview window.

  6. Instead of using the default option, it is recommended that you change the settings so that RStudio opens the output of a knitted .Rmd file in a dedicated viewer pane. Click on the small down-pointing arrow, to the right...