In the exercises below, we will continue our work with the lubridate package to see more features of it. Answers to these exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page. Exercise 1 […]
lubridate
Parsing Dates and Time – Part 2: Exercises
In the exercises below, we will continue working with lubridate and examine more features of the library. Answers to these exercises are available here. Please check the previous exercise here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on […]
Parsing Dates and Time – Part 1: Exercises
In the exercises below we will work with anytime and lubridate package to see how to manipulate date and time Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page. Exercise […]
Dates and Times – Simple and Easy with lubridate Exercises (part 3)
Welcome to the third and last part of the “lubridate” exercises. If you missed Part 1 and 2 then please refer to the links below: Part 1 Part 2 In this part, I’ll cover the following topics: 1. Durations (exact spans of time) 2. Periods (relative spans of time) 3. Rounding dates As always, in […]
Dates and Times – Simple and Easy with lubridate exercises (part 2)
This is the second part in the series teaching the “lubridate” package. As a short recap from the previous part, I mentioned that date/date_time formats are easily parced using the ymd set of functions (for example, dmy, ymd_h, etc). I also explained that arithmetic calculations are performed using the days, months, years, etc. functions. In […]
Dates and Times – Simple and Easy with lubridate exercises (part 1)
As in any programming language, handling date and time variables can be quite frustrating, since, for example, there is no one single format for dates, there are different time zones and there are issues such as daylight saving time. Base R provides several packages for handling date and time variables, but they require mastering cumbersome […]