Data Analysis with R: More dplyr

In this course we will be solidifying our learning by building upon concepts that we covered in the Dplyr Intro course.
We will also be advancing our learning too. I will show you how to use the verbs to do some more complex data gymnastics (you will find these very helpful - trust me). As an added bonus I picked a data set that has some silly data. You will learn some interesting trivia. Hint: How long do cows sleep on average per night? How about the weight of the human brain? via the dataset we will be using, like how a Cow sleeps 4 hours a day? Come on in and let’s get started.

Available Through Coursera
Data Analysis with R: More dplyr

Duration (mins)

Learners

5.0 / 5

Rating

Task List


We will cover the following tasks in 32 minutes:


Introduction

In this lesson I’m going to introduce you to the dataset and a few of the topics we will be covering. While I’m doing that I’ll show you how to use the Rhyme Interface (in case you don’t know already) and give you a short bio. Remember that learning R is easy but does take some practice. The good thing, however, is that it isn’t like learning classical piano.


Mutate Refresher

The verb Mutate is one of the more powerful verbs in the dplyr suite. The verb can create new variables while preserving the old ones. And here’s a cliff hanger. You can pass homemade functions (user defined functions) through the Mutate function. Why would you do this? To save yourself time in creating a for loop. But first things first. Come in and get a refresher.


More Mutate

In this chapter we’re going to create a few new variables in our data. This manipulation will allow us to easily spot which animals sleep the least. This is a common manipulation when looking at data for the first time. Come in and I’ll show you how this is done.


Mutating Rows as opposed to Columns

What? You can manipulate data rowise? Yep. In this lesson I will show you how. I will also share an inspiring story about the day that you take the training wheels off of R and make it your goto for data analytics.


Mutate with an If Else Statement

There are multiple ways to do the same thing in R. But. You should always be on the lookout for the most elegant way of doing something. In this example I’m going to show you how to do an If Else statement within a mutate function. While it’s pretty easy to do the same thing Base R way but it’s more efficient and elegant to do it the way I’ll show you. And it’s consistent with the rest of the code. Let’s get after it.


Mutate_All

When scraping data you will quickly learn that the data often needs to be cleaned. For example spaces need to be removed, certain character, and maybe you need to change some characters to upper or lower (or any combination of things). Using the Mutate All function you can do this in a singular step - instead of creating complicated for loops or functions. If you haven’t taken my data harvesting course on web scraping this will be a handy function for some of those problems. Let’s just go over this now.


Final Thoughts

You’ve done well. At this point you can do basic functions along with some more complicated ones. I recommend you practice for a couple weeks every day and then put the R training wheels in the garage and go for a cruise. Thank you for your time. I’ll see you in the next course.

Watch Preview

Preview the instructions that you will follow along in a hands-on session in your browser.

Chris Shockley

About the Host (Chris Shockley)


I am an R enthusiast, hiker, and amateur astronomer. My favorite hike is located in Mt. Rainier National Park, my favorite Deep Sky Object is Alberio, and my favorite R package is dplyr (since I use it everyday). I have a dog named Coog (Lllasa Apso)., I work as a Data Analyst/Financial Analyst for a Metals Co. located in Seattle, WA. I have been in my current position for 5 years. I work in SQL, R, R Shiny, QGIS. Because I have traveled the roads you are on I believe I will be an asset and will add value to your programming repertoire. We will walk through multiple examples and get to know each other through the process. Don't take my word for it though. Come on in and take a Project or two. Regards, Chris Shockley



Frequently Asked Questions


In Rhyme, all projects are completely hands-on. You don't just passively watch someone else. You use the software directly while following the host's (Chris Shockley) instructions. Using the software is the only way to achieve mastery. With the "Live Guide" option, you can ask for help and get immediate response.
Nothing! Just join through your web browser. Your host (Chris Shockley) has already installed all required software and configured all data.
You can go to https://rhyme.com, sign up for free, and follow this visual guide How to use Rhyme to create your own projects. If you have custom needs or company-specific environment, please email us at help@rhyme.com
Absolutely. We offer Rhyme for workgroups as well larger departments and companies. Universities, academies, and bootcamps can also buy Rhyme for their settings. You can select projects and trainings that are mission critical for you and, as well, author your own that reflect your own needs and tech environments. Please email us at help@rhyme.com
Rhyme strives to ensure that visual instructions are helpful for reading impairments. The Rhyme interface has features like resolution and zoom that will be helpful for visual impairments. And, we are currently developing a close-caption functionality to help with hearing impairments. Most of the accessibility options of the cloud desktop's operating system or the specific application can also be used in Rhyme. If you have questions related to accessibility, please email us at accessibility@rhyme.com
We started with windows and linux cloud desktops because they have the most flexibility in teaching any software (desktop or web). However, web applications like Salesforce can run directly through a virtual browser. And, others like Jupyter and RStudio can run on containers and be accessed by virtual browsers. We are currently working on such features where such web applications won't need to run through cloud desktops. But, the rest of the Rhyme learning, authoring, and monitoring interfaces will remain the same.
Please email us at help@rhyme.com and we'll respond to you within one business day.

No sessions available