Book Image

Hands-On Data Science with R

By : Vitor Bianchi Lanzetta, Doug Ortiz, Nataraj Dasgupta, Ricardo Anjoleto Farias
Book Image

Hands-On Data Science with R

By: Vitor Bianchi Lanzetta, Doug Ortiz, Nataraj Dasgupta, Ricardo Anjoleto Farias

Overview of this book

R is the most widely used programming language, and when used in association with data science, this powerful combination will solve the complexities involved with unstructured datasets in the real world. This book covers the entire data science ecosystem for aspiring data scientists, right from zero to a level where you are confident enough to get hands-on with real-world data science problems. The book starts with an introduction to data science and introduces readers to popular R libraries for executing data science routine tasks. This book covers all the important processes in data science such as data gathering, cleaning data, and then uncovering patterns from it. You will explore algorithms such as machine learning algorithms, predictive analytical models, and finally deep learning algorithms. You will learn to run the most powerful visualization packages available in R so as to ensure that you can easily derive insights from your data. Towards the end, you will also learn how to integrate R with Spark and Hadoop and perform large-scale data analytics without much complexity.
Table of Contents (16 chapters)

Building an application inside R

To build an application inside R, you need to understand how reactivity works. I'll explain it with an analogy using WhatsApp. Imagine your WhatsApp as the input object and you as the output object; any time a friend (the user) sends you a message, WhatsApp rings, alerting you about it, so you answer your friend with a new message based on what he/she wrote you. This is how reactive works in R's shiny package. Any time the user interacts and changes the value of an input, it alerts the server function that the output is outdated. So, the server function returns the code, pulling the new value inside the input$* variable, then returns the updated output.

It is important to know how it work mainly because there are situations where the server function can't rerun the code properly if a reactive expression isn't used. Reactive...