From the course: Complete Guide to R: Wrangling, Visualizing, and Modeling Data
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Working with dates and times
From the course: Complete Guide to R: Wrangling, Visualizing, and Modeling Data
Working with dates and times
- [Instructor] The challenges in preparing your data consists not only of trying to get things in a nice, rectangular data set but also dealing with specific kinds of data, the values that are in there. And one of them that can be kind of challenging is dates, years and months and time, because those are processed differently in many different procedures. Fortunately, R has some special packages. The lubridate package in particular, which is part of the tidyverse, can help work with dates and help it so you can get the information you need for your analyses. I want to demonstrate this by first loading a few packages, including lubridate, which does dates and times, and tsibble, or tsibble, which is for working with time-series data. So let's load those. And then I'm going to come down, and I'm going to use a data set that is part of R's built-in data sets, that's called EuStockMarkets. We'll get a little bit of information on that one. It's the daily closing prices of major European…
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)
Creating tidy data10m 12s
-
(Locked)
Using tibbles4m 51s
-
(Locked)
Using data.table4m 57s
-
(Locked)
Converting data from wide to tall and from tall to wide4m 13s
-
(Locked)
Converting data from tables to rows5m 2s
-
(Locked)
Working with dates and times6m 21s
-
Working with list data5m 14s
-
(Locked)
Working with XML data5m 22s
-
(Locked)
Working with categorical variables6m 29s
-
(Locked)
Filtering cases and subgroups7m 32s
-
(Locked)
-
-
-
-
-
-
-