time2year | R Documentation |
A time named column in a data.frame that is a Date object is converted to year column that is a numeric column.
time2year(x)
x |
A data.frame |
A data.frame
x <- data.frame(time = as.Date(c("2020-01-01", "2021-01-01", "2022-01-01")), a = c(1,2,3))
time2year(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.