dmy: Date parse

Description Usage Arguments Details Value Examples

Description

Parse day/month/year column data into standard date format.

Usage

1
dmy(d, m, y, origin = c(1, 1, 1900))

Arguments

d, m, y

day, month, year as single integers or vectors

origin

vector of length 3 with origins for d, m, and y, respectively; see details

Details

For two-digit years, the origin year should be specified; otherwise, the default of 1900 will be used. For NA year, month, or day, origin is used for defaults, i.e., origin = c(15, 6, 2000) will convert missing days to day 15, missing months to June, and missing years to 2000.

Value

A vector of Date-formatted strings.

Examples

1
2
dmy(25, 7, 87)
dmy(NA, NA, 2000:2005)

raredd/trainr documentation built on May 27, 2019, 2:03 a.m.