Search notes:

R function: as.Date

as.Date converts from a character representation of a date to an object whose class is Date.
a_date <- as.Date("2014-06-26")

a_date
# [1] "2014-06-26"

a_date + 1   # one day later
# [1] "2014-06-27"

another_date <- as.Date("08/28/1970", format="%m/%d/%Y")
another_date
# [1] "1970-08-28"

mode(a_date)
# [1] "numeric"

length(a_date)
# [1] 1

class(a_date)
# [1] "Date"
Github repository about-r, path: /functions/as.Date/as.Date.R

origin

The origin parameter specifies a starting date from which the number is added:
dt <- as.Date(20, origin='2018-05-01');
dt;
#
#  "2018-05-21"
Github repository about-r, path: /functions/as.Date/origin.R

See also

Index to (some) R functions
Date class

Index