Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer TODO to github issues #27

Closed
hadley opened this issue Jul 15, 2009 · 1 comment
Closed

Transfer TODO to github issues #27

hadley opened this issue Jul 15, 2009 · 1 comment

Comments

@hadley
Copy link
Member

hadley commented Jul 15, 2009

and then delete.

@garrettgman
Copy link
Member

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants