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

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…

Contents