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

Adding a dataset to a package

Packages are also used to deliver research and research results to people and make them reproducible. Therefore, it is often necessary to include a dataset in our R package. Many packages also use this possibility to include this data into their demo code, to give users the possibilities to execute a demo version of the package's functions instantly without the need to import your own data.

To include this data, R provides several options. The choice of the option depends on what kind of data we want to attach to the package and what this data will be used for.

The most common way is to include it in the data subdirectory. This way is often used when our dataset is used for the example code. Another way to include it is an .rda file in the sysdata.rda file. We can use this function if we do not want the package's users to have full access to these datasets.

The data files we can include in the package can be in three formats:

  • R code

  • Tables (.txt or .csv* files)

  • Save...