Working with Lubridate Package in R

This tutorial gives you an introduction about working with the lubridate package in R.

This post is partly based on the following paper (PDF) published by the authors of the lubridate package:

Garrett Grolemund and Hadley Wickham, Dates and Times Made Easy with lubridate, Journal of Statistical Software, Vol 40, No. 3, April 2011

Read more Working with Lubridate Package in R

Introduction to Dates and Times in R

This tutorial gives a brief introduction to dates and times in R.

1  Overview

There are several ways of handling with date and time data in R:

  • The date class in base R — handles dates without time
  • The chron package — handles dates and times without control for time zones.
  • The POSIXt classes in base R — handle dates and times with control for time zone.
  • The lubridate package
  • The timeDate package
  • The zoo package
  • The xts package

General rule for choosing ways for handling dates/times:

  • I would choose date and POSIXt classes if they meet my requirements, since they are included in R base. Why bother with external (package) dependencies unless very necessary?

Read more Introduction to Dates and Times in R