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 10 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

What are the prerequisites for this course?

  • Basic knowledge of R & RStudio
  • Working internet connection

Who is this course for?

Anyone interested in learning more about handling date and time data in R.

How will I execute the practicals?

You will use RStudio for the practicals. All the code used in the examples, assignments and case study are available for download from the learning management system. For those of you who have issues installing RStudio on your system, we have created a RStudio cloud project where you can practice without installing anything.



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

    • Module Overview

    • 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

    • Module Overview

    • 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

    • Module Overview

    • 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

    • Module Overview

    • 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

    • Module Overview

    • 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