-Dealing with Dates
#Getting current date & time
Sys.timezone()
[1] "Europe/Berlin"
> Sys.Date()
[1] "2018-09-07"
> Sys.time()
[1] "2018-09-07 12:58:09 CEST"library(lubridate)
now()#Converting strings to dates
Convert Strings to Dates:
x <- c("2015-07-01", "2015-08-01", "2015-09-01")
as.Date(x)
## [1] "2015-07-01" "2015-08-01" "2015-09-01"Create Dates by Merging Data:
#Extract & manipulate parts of dates
#Creating date sequences
#Calculations with dates
#Dealing with time zones & daylight savings
#Additional resources
Last updated