Category Archives: R

Dealing with Date in R language

In R there is a class called Date. If we want to get the components of a date variable or date string, we can use the following function to do it. toNumerics <- function(Date) { stopifnot(inherits(Date, c(“Date”, “POSIXt”))) day <- … Continue reading

Share
Posted in R, R/S-Plus | Leave a comment