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

Advanced R Markdown documents


After compiling our first R Markdown report, we want to go ahead and look at the advanced options for embedding code chunks with the knitr syntax. Also, you will learn how to brand your reports with custom style sheets.

Getting to know R code chunks

As we have already seen in our sample report, R Markdown uses so called code chunks to render R Code into reports.

This exemplary code chunk shows the most elementary way to include an R code snippet in our .Rmd file. Just three back ticks, ``` at the beginning and end of the chunk, and the letter r in curly brackets, {r}.

Even if it is a short code chunk, the output includes an H1 heading, the used R code, and a complete plot.

Customizing R code chunks

R Markdown offers a lot of options to customize your code chunks. This is necessary because, on the one hand, R Markdown includes all code lines and even error and warning messages by default. On the other hand, including many lines of code may distract readers from your...