From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with dates and times

Working with dates and times

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

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 analysis. I want to demonstrate this, by first loading a few packages, including lubridate, which does dates and times, and to ttsibble 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, it's called EuStockmarkets, we'll get a little bit of…

Contents