**DataCamp Community - r programming**, and kindly contributed to R-bloggers)

Hello R users! We just launched another course today: Working with Dates and Times in R by Charlotte Wickham!

Dates and times are abundant in data and essential for answering questions that start with when, how long, or how often. However, they can be tricky, as they come in a variety of formats and can behave in unintuitive ways. This course teaches you the essentials of parsing, manipulating, and computing with dates and times in R. By the end, you’ll have mastered the `lubridate`

package, a member of the `tidyverse`

, specifically designed to handle dates and times. You’ll also have applied your new skills to explore how often R versions are released, when the weather is good in Auckland (the birthplace of R), and how long monarchs ruled in Britain.

**Take me to chapter 1!**

Working with Dates and Times in R features interactive exercises that combine high-quality video, in-browser coding, and gamification for an engaging learning experience that will make you an expert in dates and times in R!

**What you’ll learn**

**1. Dates and Times in R**

Dates and times come in a huge assortment of formats, so your first hurdle is often to parse the format you have into an R datetime. This chapter teaches you to import dates and times with the `lubridate`

package. You’ll also learn how to extract parts of a datetime. You’ll practice by exploring the weather in R’s birthplace, Auckland NZ.

**2. Parsing and Manipulating Dates and Times with lubridate**

Dates and times come in a huge assortment of formats, so your first hurdle is often to parse the format you have into an R datetime. This chapter teaches you to import dates and times with the `lubridate`

package. You’ll also learn how to extract parts of a datetime. You’ll practice by exploring the weather in R’s birthplace, Auckland NZ.

**3. Arithmetic with Dates and Times**

Getting datetimes into R is just the first step. Now that you know how to parse datetimes, you need to learn how to do calculations with them. In this chapter, you’ll learn the different ways of representing spans of time with `lubridate`

and how to leverage them to do arithmetic on datetimes. By the end of the chapter, you’ll have calculated how long it’s been since the first man stepped on the moon, generated sequences of dates to help schedule reminders, calculated when an eclipse occurs, and explored the reigns of monarch’s of England (and which ones might have seen Halley’s comet!).

**4. Problems in practice**

You now know most of what you need to tackle data that includes dates and times, but there are a few other problems you might encounter in practice. In this final chapter you’ll learn a little more about these problems by returning to some of the earlier data examples and learning how to handle time zones, deal with times when you don’t care about dates, parse dates quickly, and output dates and times.

**Master dates and times in R with our latest course!**

**leave a comment**for the author, please follow the link and comment on their blog:

**DataCamp Community - r programming**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...