You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the TODO. I transferred the issues that I think lubridate could improve. Most of the issues lubridate already handles or are the result of people not knowing how to use R:
Date related queries to R-Help
(Also the help desk article in RNews 4/1 contains info on dates)
ymd() - make R recognize dates as dates
newDate <- as.Date(result[,"Date"], "%d.%m.%y"))
data[data$date < ymd(2000-03-02),] - subset my data based on its date column
ymd() - get as.POSIXct() to recognize my data format
? - retain the date class? e.g Unlist() drops the class attribute
and ifelse(d > "1996-1-1", "1996-1-1", d) doesn not work
added - convert a date to a year + decimal (e.g. 2000-07-01 ~ 2000.4953)
new_date <- (as.POSIXct(date) - as.POSSIXct(origin)) or start point + duration - compute any date from a specified start point
R DOES - determine the weekday of any date
as.numeric(format(d, "%w")) # 0 = Sunday
# or
format(d, "%a")
# or
weekdays(d)
R DOES? - use a date value as an index in a for loop
NA - general frustration of R not recognizing dates imported from excel
year(), week() - extract year and week information from a date
and then delete.
The text was updated successfully, but these errors were encountered: