Course Description

This course is designed to give you a comprehensive introduction to handling date and time data in R. If you are someone who deals with data, you would know that date/time come in all possible weird formats. As such, it is important to know how to parse, manipulate and compute with date and time in R. This course consists of 11 modules. It starts simple by exploring how to get date and time in R and introducing the participants to the case study. You will learn the different ways to represent date/time data and how R stores them internally. You will explore POSIX and the ISO 8601 standard for representing date/time.

In the third module, you will be introduced to date arithmetic. You will learn how to add/subtract days/weeks/months to/from a date and how to shift dates. In the 4th module, you will understand time zones and daylight savings. You will learn how to get the time zone in R, how to set it using environmental variable and how to view the time in a different time zone. You will also learn to check if daylight savings is in effect. In the 5th module, you will look at all the possible weird ways in which date and time are specified in the real world. You will then learn about conversion specifications which will allow you to specify any given date/time in the ISO 8601 standard we discussed in the second module.

In the 6th module, you will learn how to parse/read data that includes date/time. Building up on the conversion specifications learnt in the previous module, you will learn to convert to/from date/time. In the 7th module, you will learn to extract the different components including year, month, date, week, day, quarter, semester, hour, minute, second and time zone. You will also learn to handle label and abbreviations of month/day/quarter. In the 8th module, you will learn how to create/update/verify date/time objects. You will end this module by learning a variety of ways to create sequence of dates. In the 9th module, you will learn about expressing date/time in different ways such as intervals, durations and period. In the last module, you will learn to round and rollback date/time.

What will I learn?


Self Paced Online Classes

Our online self paced courses are designed to allow participants to learn at their convenience. Learning outcomes are clearly defined and enhanced by the use of byte sized videos, PPTs, assignments, quizzes, suggested reading and case studies. Participants can take advantage of the discussion forum to discuss with their peers and the instructors to enhance their learning experience.

Course Features


Course Requirements

  • Access to a computer with an internet connection

  • Ability and permissions to download files & install software

  • Basic knowledge of English (Course is delivered in English language)


Who is this course for?


We expect the students to have some prior experience with R and RStudio. If you have never used R before, our Introduction to R course will help you prepare for this course.


Why should I enroll?


This course offers you the opportunity to master the skills required to handle date & time data in R. After completing this course, you will be able to create, transform, extract & operate on date/time objects. You will understand date/time formats, time zones and daylight savings.


If I do not meet the requirements to enroll, what should I do?

We have a number of free courses that can help you prepare including:

  • Introduction to R

  • Import Data into R

  • Data Wrangling with dplyr



How will I execute the practical's?


You will use RStudio for the practical's. All the R scripts used in the examples, assignments and case study are available for download from the Learning Management System. For those of you who face issues installing RStudio on your system, we have created a RStudio cloud project where you can practice without installing any software or downloading files.


Do I need to apply? What are the admission criteria?

No. This course is open to enrolment for all and accepts students regardless of experience and background.



Course curriculum

  • 1

    Welcome

    • Welcome

    • Course Introduction

  • 2

    Resources

    • Slides

    • Data Sets

    • References & Readings

    • Case Study - R Script

    • RStudio Cloud

    • Slides - PPT

  • 3

    Introduction

    • Module Overview

    • Current Date & Time

    • Case Study - Introduction

    • R Script

    • Your Turn

    • Key Concepts

  • 4

    Date & Time Classes

    • Module Overview

    • Introduction

    • Date Class

    • ISO Date

    • POSIXct

    • POSIXlt

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 5

    Date Arithmetic

    • Introduction

    • Shift Date

    • Case Study - I

    • Case Study - II

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 6

    Time Zones & Daylight Savings

    • Time Zone

    • Set & Get Time Zone

    • Daylight Savings

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 7

    Date & Time Formats

    • Module Overview

    • Introduction

    • Date Formats

    • Date & Time Formats

    • Guess Formats

    • Read Data - I

    • Read Data - II

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 8

    Parsing Date & Time

    • Introduction

    • Date/Time to Character

    • Parse Date & Time

    • Helper Functions

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 9

    Date & Time Components

    • Introduction

    • Day

    • Hour, Minute & Second

    • Quarter & Semester

    • Case study - I

    • Case Study - II

    • Case study - III

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 10

    Create, Update & Verify

    • Module Overview

    • Introduction

    • Update Date & Time

    • Date Sequence - Introduction

    • Date Sequence - I

    • Date Sequence - II

    • Date Sequence - III

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 11

    Intervals, Duration & Period

    • Interval

    • Case Study - I

    • Case Study - II

    • Shift Intervals

    • Within

    • Duration - I

    • Duration - II

    • Period

    • Time Length

    • R Script

    • Key Concepts

  • 12

    Others

    • Module Overview

    • Round Dates

    • Rollback Dates

    • Your Turn

    • R Script

    • Your Turn

    • Your Turn - Solutions

    • Key Concepts

  • 13

    Course Summary & Survey

    • Course Summary

    • Course Survey

Recommended Courses