From the course: Learning the R Tidyverse
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Convert strings to dates with mutate - R Tutorial
From the course: Learning the R Tidyverse
Convert strings to dates with mutate
- [Instructor] Dplyr is a member of the tidyverse ecosystem and designed for mini plating data with a variety of different verbs. If you're interested in manipulating data sets, then mutate is the function you want to use. Mutate lets you modify existing columns, for instance, modifying a column with misform dates into something that can actually be used by R for date arithmetic. Mutate can also be used to add new columns to a data set. For instance, calculating percentage values. Let's jump into our exercise files to see some examples of using mutate. Our exercise files contain two folders, data and data-raw. Let's have a look inside of data. That's currently empty. Data-raw, that has an Excel file in it, and also a data-tidyingR file. This is where we're going to be working, so let's open that up. I'm just going to resize some of my windows, so I've got more room to play with. I don't need a file explorer anymore, so I'll maximize the size of the Console. Now let's see what we have…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Separate raw and clean data folders2m 48s
-
(Locked)
Import .xlsx files with readxl in R12m 19s
-
(Locked)
Import .csv files with readr into R5m 38s
-
(Locked)
Is it a data frame or a tibble?10m 43s
-
(Locked)
Select and filter data9m 32s
-
(Locked)
Convert strings to dates with mutate6m 40s
-
(Locked)
Separating columns into multiple columns6m 36s
-
(Locked)
Filter out NA values3m 35s
-
(Locked)
Export .csv files with readr5m 6s
-
(Locked)
Export .rdata objects for later4m 51s
-
(Locked)
-
-
-
-