September 2018
Beginner
206 pages
4h 27m
English
Dates are a special type of data in R, and are distinct from the date types POSIXct and POSIXlt, which represent calendar dates and times in more formal ways.
Let's create and check the class() and typeof() of different date objects in R. Follow these steps:
e <- as.Date("2016-09-05")f <- as.POSIXct("2018-04-05")
class(e)typeof(e)class(f)typeof(f)
Output: The preceding code provides the following output:

One nice thing about R is that we can change objects from one type to another using the as.*() ...
Read now
Unlock full access