RStudio for R Statistical Computing Cookbook

Over 50 practical and useful recipes to help you perform data analysis with R by unleashing every native RStudio feature

RStudio for R Statistical Computing Cookbook

This ebook is included in a Mapt subscription
Andrea Cirillo

9 customer reviews
Over 50 practical and useful recipes to help you perform data analysis with R by unleashing every native RStudio feature
$0.00
$35.99
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784391034
Paperback246 pages

Book Description

The requirement of handling complex datasets, performing unprecedented statistical analysis, and providing real-time visualizations to businesses has concerned statisticians and analysts across the globe. RStudio is a useful and powerful tool for statistical analysis that harnesses the power of R for computational statistics, visualization, and data science, in an integrated development environment.

This book is a collection of recipes that will help you learn and understand RStudio features so that you can effectively perform statistical analysis and reporting, code editing, and R development. The first few chapters will teach you how to set up your own data analysis project in RStudio, acquire data from different data sources, and manipulate and clean data for analysis and visualization purposes. You'll get hands-on with various data visualization methods using ggplot2, and you will create interactive and multidimensional visualizations with D3.js. Additional recipes will help you optimize your code; implement various statistical models to manage large datasets; perform text analysis and predictive analysis; and master time series analysis, machine learning, forecasting; and so on. In the final few chapters, you'll learn how to create reports from your analytical application with the full range of static and dynamic reporting tools that are available in RStudio so that you can effectively communicate results and even transform them into interactive web applications.

Table of Contents

Chapter 1: Acquiring Data for Your Project
Introduction
Acquiring data from the Web – web scraping tasks
Accessing an API with R
Getting data from Twitter with the twitteR package
Getting data from Facebook with the Rfacebook package
Getting data from Google Analytics
Loading your data into R with rio packages
Converting file formats using the rio package
Chapter 2: Preparing for Analysis – Data Cleansing and Manipulation
Introduction
Getting a sense of your data structure with R
Preparing your data for analysis with the tidyr package
Detecting and removing missing values
Substituting missing values using the mice package
Detecting and removing outliers
Performing data filtering activities
Chapter 3: Basic Visualization Techniques
Introduction
Looking at your data using the plot() function
Using pairs.panel() to look at (visualize) correlations between variables
Adding text to a ggplot2 plot at a custom location
Changing axes appearance to ggplot2 plot (continous axes)
Producing a matrix of graphs with ggplot2
Drawing a route on a map with ggmap
Making use of the igraph package to draw a network
Showing communities in a network with the linkcomm package
Chapter 4: Advanced and Interactive Visualization
Introduction
Producing a Sankey diagram with the networkD3 package
Creating a dynamic force network with the visNetwork package
Building a rotating 3D graph and exporting it as a GIF
Using the DiagrammeR package to produce a process flow diagram in RStudio
Chapter 5: Power Programming with R
Introduction
Writing modular code in RStudio
Implementing parallel computation in R
Creating custom objects and methods in R using the S3 system
Evaluating your code performance using the profvis package
Comparing an alternative function's performance using the microbenchmarking package
Using GitHub with RStudio
Chapter 6: Domain-specific Applications
Introduction
Dealing with regular expressions
Analyzing PDF reports in a folder with the tm package
Creating word clouds with the wordcloud package
Performing a Twitter sentiment analysis
Detecting fraud in e-commerce orders with Benford's law
Measuring customer retention using cohort analysis in R
Making a recommendation engine
Performing time series decomposition using the stl() function
Exploring time series forecasting with forecast()
Tracking stock movements using the quantmod package
Optimizing portfolio composition and maximising returns with the Portfolio Analytics package
Forecasting the stock market
Chapter 7: Developing Static Reports
Introduction
Using one markup language for all types of documents – rmarkdown
Writing and styling PDF documents with RStudio
Writing wonderful tufte handouts with the tufte package and rmarkdown
Sharing your code and plots with slides
Curating a blog through RStudio
Chapter 8: Dynamic Reporting and Web Application Development
Introduction
Generating dynamic parametrized reports with R Markdown
Developing a single-file Shiny app
Changing a Shiny app UI based on user input
Creating an interactive report with Shiny
Constructing RStudio add-ins
Sharing your work on RPubs
Deploying your app on Amazon AWS with ramazon

What You Will Learn

  • Familiarize yourself with the latest advanced R console features
  • Create advanced and interactive graphics
  • Manage your R project and project files effectively
  • Perform reproducible statistical analyses in your R projects
  • Use RStudio to design predictive models for a specific domain-based application
  • Use RStudio to effectively communicate your analyses results and even publish them to a blog
  • Put yourself on the frontiers of data science and data monetization in R with all the tools that are needed to effectively communicate your results and even transform your work into a data product

Authors

Table of Contents

Chapter 1: Acquiring Data for Your Project
Introduction
Acquiring data from the Web – web scraping tasks
Accessing an API with R
Getting data from Twitter with the twitteR package
Getting data from Facebook with the Rfacebook package
Getting data from Google Analytics
Loading your data into R with rio packages
Converting file formats using the rio package
Chapter 2: Preparing for Analysis – Data Cleansing and Manipulation
Introduction
Getting a sense of your data structure with R
Preparing your data for analysis with the tidyr package
Detecting and removing missing values
Substituting missing values using the mice package
Detecting and removing outliers
Performing data filtering activities
Chapter 3: Basic Visualization Techniques
Introduction
Looking at your data using the plot() function
Using pairs.panel() to look at (visualize) correlations between variables
Adding text to a ggplot2 plot at a custom location
Changing axes appearance to ggplot2 plot (continous axes)
Producing a matrix of graphs with ggplot2
Drawing a route on a map with ggmap
Making use of the igraph package to draw a network
Showing communities in a network with the linkcomm package
Chapter 4: Advanced and Interactive Visualization
Introduction
Producing a Sankey diagram with the networkD3 package
Creating a dynamic force network with the visNetwork package
Building a rotating 3D graph and exporting it as a GIF
Using the DiagrammeR package to produce a process flow diagram in RStudio
Chapter 5: Power Programming with R
Introduction
Writing modular code in RStudio
Implementing parallel computation in R
Creating custom objects and methods in R using the S3 system
Evaluating your code performance using the profvis package
Comparing an alternative function's performance using the microbenchmarking package
Using GitHub with RStudio
Chapter 6: Domain-specific Applications
Introduction
Dealing with regular expressions
Analyzing PDF reports in a folder with the tm package
Creating word clouds with the wordcloud package
Performing a Twitter sentiment analysis
Detecting fraud in e-commerce orders with Benford's law
Measuring customer retention using cohort analysis in R
Making a recommendation engine
Performing time series decomposition using the stl() function
Exploring time series forecasting with forecast()
Tracking stock movements using the quantmod package
Optimizing portfolio composition and maximising returns with the Portfolio Analytics package
Forecasting the stock market
Chapter 7: Developing Static Reports
Introduction
Using one markup language for all types of documents – rmarkdown
Writing and styling PDF documents with RStudio
Writing wonderful tufte handouts with the tufte package and rmarkdown
Sharing your code and plots with slides
Curating a blog through RStudio
Chapter 8: Dynamic Reporting and Web Application Development
Introduction
Generating dynamic parametrized reports with R Markdown
Developing a single-file Shiny app
Changing a Shiny app UI based on user input
Creating an interactive report with Shiny
Constructing RStudio add-ins
Sharing your work on RPubs
Deploying your app on Amazon AWS with ramazon

Book Details

ISBN 139781784391034
Paperback246 pages
Read More
From 9 reviews

Read More Reviews