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

Writing the documentation for a package

As mentioned, the man folder contains all the necessary documentation files. It consists of R documentation files, which can be recognized by their file extension Rd.

Documenting our R code as well as possible is very important. It gives other people the chance to understand our functions and how to actually implement them into their workflow.

After creating the project, this folder contains a basic documentation file for the project in general. The R documentation files are written in the so-called Rd-format, which is closely related to LaTeX and can be processed into various output formats including HTML or plain text.

Creating Rd documentation files

We have two ways to create an Rd file:

  • We can call the prompt() function in the R console and send as an argument the function we want to create a documentation file for. So the function call prompt(lm) would create the lm.Rd file in our current working directory. We can then move this file to the man folder...