Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
R Programming Fundamentals
R Programming Fundamentals

R Programming Fundamentals: Deal with data using various modeling techniques

eBook
€8.99 €22.99
Paperback
€28.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

R Programming Fundamentals

Data Visualization and Graphics

Data visualizations are very important in data science. They are used as a part of Exploratory Data Analysis (EDA), to familiarize yourself with data, to examine the distributions of variables, to identify outliers, and to help guide data cleaning and analysis. They are also used to communicate results to a variety of audiences, from other data scientists to customers.

EDA is the general name for the process of using numerical summaries, plots, and aggregating methods to explore a dataset to familiarize yourself with its contents. It will almost certainly involve you examining the distribution of variables in the dataset, looking at missingness, deciding whether there are any outliers or errors, and generally getting a feel for what is contained in your data.

In this chapter, you'll learn about base plots, ggplot2, and will be briefly introduced...

Creating Base Plots

R can plot data without installing any additional packages. This is commonly referred to as base plotting. It is called base plotting because, like functions that come pre-installed with R in the base package, discussed in Chapter 1, Introduction to R, these plots are built into R. The graphics package comes with a download of R and enables you to plot data without installing any other packages.

To see details on the graphics package, you can search for R graphics package in a search engine of your choice or navigate to the following URL: https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/00Index.html.

Base plots are often not used outside of work done for data cleaning and EDA. Many data scientists use other more aesthetically pleasing plots, such as those generated using ggplot2 or Plotly, for any plots or graphs that a customer may see. It is important...

ggplot2

ggplot2 is an incredibly popular graphics package in R. It can be installed on its own or comes as part of the Tidyverse set of packages.

Developed by Hadley Wickham and Winston Chang, ggplot2 implements the Grammar of Graphics, a pre-existing idea in statistical computing, for R. As we begin making plots with ggplot2, you may recognize the aesthetic of the plots, as ggplots are widely used in publications, data journalism, and blog posts.

When you're using ggplot2, both as you're learning how to use it and even when you're more seasoned, the official RStudio ggplot2 cheat sheet will be a resource you may want to keep close for your reference. It will not only remind you of the basics (and more advanced implementations) of how to use ggplot2, it gives suggestions for which plots to use when you have certain types of variables (for example, if you have one...

Interactive Plots

Learning to build interactive plots is not within the scope of this book, but it is likely that you will see (and admire!) them on your data science with R journey, so a few examples are laid out in this topic.

Plotly

Plotly is an R package designed to allow you to create interactive plots online. It integrates with ggplot2, which we also learned in this chapter, and can be implemented in a number of programming languages as well, including Scala, Python, and Node.js.

We can view a few of these demos on the Plotly website, such as Dashboards under Plotly Fundamentals. We can see a full dashboard of Plotly charts load, including a plot of the diamonds dataset in the upper left, a bar chart next to it, a map...

Summary

Graphing in R will be crucial in your data science work, and we have covered most of the basics here. However, graphing is one of those things where, most of the time, there are always going to be different types of graphs you haven't heard of yet and options you haven't yet selected, so it's important to know where to look for assistance and how to keep learning.

We have only covered the basics to get you off the ground in ggplot2 in this book, so you'll definitely need to use Stack Overflow and the ggplot2 official documentation on the Tidyverse website to experiment with different graphs and aesthetics. You should look into how to use scales, how to have ggplot2 calculate statistics for you, and the many other different types of plots available.

Let's press forward on to the next topic, where we'll begin to look at some data more...

Left arrow icon Right arrow icon

Key benefits

  • Get to grips with data cleaning methods
  • Explore statistical concepts and programming in R, including best practices
  • Build a data science project with real-world examples

Description

R Programming Fundamentals, focused on R and the R ecosystem, introduces you to the tools for working with data. You’ll start by understanding how to set up R and RStudio, followed by exploring R packages, functions, data structures, control flow, and loops. Once you have grasped the basics, you’ll move on to studying data visualization and graphics. You’ll learn how to build statistical and advanced plots using the powerful ggplot2 library. In addition to this, you’ll discover data management concepts such as factoring, pivoting, aggregating, merging, and dealing with missing values. By the end of this book, you’ll have completed an entire data science project of your own for your portfolio or blog.

Who is this book for?

R Programming Fundamentals is for you if you are an analyst who wants to grow in the field of data science and explore the latest tools.

What you will learn

  • Use basic programming concepts of R such as loading packages, arithmetic functions, data structures, and flow control
  • Import data to R from various formats such as CSV, Excel, and SQL
  • Clean data by handling missing values and standardizing fields
  • Perform univariate and bivariate analysis using ggplot2
  • Create statistical summary and advanced plots such as histograms, scatter plots, box plots, and interaction plots
  • Apply data management techniques, such as factoring, pivoting, aggregating, merging, and dealing with missing values, on example datasets

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 27, 2018
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789616101
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Sep 27, 2018
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789616101
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 103.97
R Programming Fundamentals
€28.99
R Programming By Example
€41.99
Hands-On Data Science with R
€32.99
Total 103.97 Stars icon
Banner background image

Table of Contents

5 Chapters
Introduction to R Chevron down icon Chevron up icon
Data Visualization and Graphics Chevron down icon Chevron up icon
Data Management Chevron down icon Chevron up icon
Solutions Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(1 Ratings)
5 star 0%
4 star 0%
3 star 100%
2 star 0%
1 star 0%
Tim S. Mar 14, 2020
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Unfortunately all of the "<" and ">" characters were printed as "<" and ">". This is not good for a language that uses the syntax like: area_triangle <- function(base, height).Instead you get ( example from page 10): area_triangle <- function(base, height).It's that way until the last ten pages of the book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.