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
Web Application Development with R Using Shiny

You're reading from   Web Application Development with R Using Shiny Build stunning graphics and interactive data visualizations to deliver cutting-edge analytics

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher
ISBN-13 9781788993128
Length 238 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Chris Beeley Chris Beeley
Author Profile Icon Chris Beeley
Chris Beeley
Shitalkumar R. Sukhdeve Shitalkumar R. Sukhdeve
Author Profile Icon Shitalkumar R. Sukhdeve
Shitalkumar R. Sukhdeve
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Beginning R and Shiny 2. Shiny First Steps FREE CHAPTER 3. Integrating Shiny with HTML 4. Mastering Shiny's UI Functions 5. Easy JavaScript and Custom JavaScript Functions 6. Dashboards 7. Power Shiny 8. Code Patterns in Shiny Applications 9. Persistent Storage and Sharing Shiny Applications 10. Other Books You May Enjoy

Database using Dplyr, DBI, and POOL

In this section, we will learn to use the dplyr package to access data from database sources. We will also see how to hook up to an external database using the DBI package. The Pool package is also an important topic to manage connections and prevent leaks to manage performance.

  • dplyr: A popular data-manipulation package for internal and external databases. It internally works as SQL. It provides a variety of functions for data manipulation:
    • filter()
    • select()
    • arrange()
    • rename()
    • distinct()
    • mutate()
    • transmute()
    • summarise()
    • sample_n()
    • sample_frac()

Let's see an example using some of these functions with the iris dataset:

library(dplyr) 
iris %>% filter(Sepal.Length>4 &Sepal.Length<5) 

In the preceding code, the filter function has been used to filter the rows of the iris dataset, which has values between 4 and 5. We can also...

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 $19.99/month. Cancel anytime