The base package, one of R's core packages, provides two types of date and time classes:
- Date: This is a simple representation of a calendar date following the ISO 8601 international standard format (or the Gregorian calendar format) using the YYYY-m-d date format. Each date object has a numeric value of the number of days since the origin point (the default setting is 1970-01-01). In the Handling numeric date objects section in this chapter, we will discuss the usage of the origin in the reformatting process of date objects in more detail. It will make sense to use this format when the frequency of the data is daily or lower (for example, monthly, quarterly, and so on) and the time of the day doesn't matter.
- POSIXct/POSIXlt: Also known as the DateTime classes (that is, they represent both date and time), these are two POSIX date/time classes...