Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering RStudio: Develop, Communicate, and Collaborate with R

You're reading from   Mastering RStudio: Develop, Communicate, and Collaborate with R Harness the power of RStudio to create web applications, R packages, markdown reports and pretty data visualizations

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher Packt
ISBN-13 9781783982547
Length 348 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. The RStudio IDE – an Overview FREE CHAPTER 2. Communicating Your Work with R Markdown 3. R Lesson I – Graphics System 4. Shiny – a Web-app Framework for R 5. Interactive Documents with R Markdown 6. Creating Professional Dashboards with R and Shiny 7. Package Development in RStudio 8. Collaborating with Git and GitHub 9. R for your Organization – Managing the RStudio Server 10. Extending RStudio and Your Knowledge of R Index

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime