powered by
Returns a data frame that's ordered by its date column
orderByDate(df, dateCol, descending = FALSE)
A data frame
Name of column in data frame that contains dates
Boolean for whether the output should be in descending order
A data frame ordered by date column
http://healthcareai-r.readthedocs.io
healthcareai
# NOT RUN { df <- data.frame(date=c('2009-01-01','2010-01-01','2009-03-08','2009-01-19'), a=c(1,2,3,4)) dfResult <- orderByDate(df,'date', descending=FALSE) head(dfResult) # }
Run the code above in your browser using DataLab