dmy2date | R Documentation |
Converts day,month,year to a Date column (as.Date
)
dmy2date(
d,
day,
month,
year,
newName = "date",
dateFormat = c("%d", "%m", "%Y")
)
d |
Data frame |
day |
Day column |
month |
Month column |
year |
Year column |
newName |
Name for new date column (default = "date") |
dateFormat |
Date format for each column (default = c("%d","%m","%Y"), see |
A data frame
dat <- data.frame(a=letters[1:2],d=c(10,12),
m=c(6,12),y=c(1988,2012))
dmy2date(dat,d,m,y,'newDate')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.