search for: datetimeclasses

Displaying 20 results from an estimated 77 matches for "datetimeclasses".

2012 Dec 06
1
Incorrect DST time changes in DateTimeClasses
Can anyone please shed any light on why R DateTimeClasses give weird times for when daylight saving time information changes, and which aren't consistent with the OS? Example: Expected result: in New Zealand DST stopped (NZDT -> NZST) at 03:00 NZDT on 2010-04-04, as confirmed by the OS time zone info (OS X 10.8.2): zdump -v /etc/localtime /e...
2009 Nov 19
0
In the documentation of 'Ops.Date', please remove mention about "difftime", like in the documentation of 'DateTimeClasses' (PR#14072)
...at the usage is=0Adate + x=0ASo,=0Adate + x=0Ashould work.= =0A=0ASo, in the documentation of 'Ops.Date', in the explanation about argu= ment 'x', please remove the phrase "or an object of class "difftime".". Tha= t would be in line with the documentation of 'DateTimeClasses', and at leas= t saves new users.=0A=0AThank you.=0A=0A=0A New Email addresses availa= ble on Yahoo!=0AGet the Email name you've always wanted on the new @yma= il and @rocketmail. =0AHurry before someone else does!=0Ahttp://mail.promot= ions.yahoo.com/newdomains/aa/
2002 Feb 13
2
formatting date strings
Hi all I am a relatively new R user so please excuse this question if it has been covered some where else, just tell me where to find it. I have a simulation model that out puts dates in a standard dd/mm/yy format R reads this as a factor and I cant find anything that will allow me to convert them to a date. In S+ I have used a chron() function that required you to specify the format of the
2005 Nov 23
3
date/time arithmetic
On the help page "DateTimeClasses {base}" it says: "One can add or subtract a number of seconds or a difftime object from a date-time object, but not add two date-time objects." However, > x<-Sys.time(); y<-Sys.time()+3600 > diff<-y-x > x; y; diff [1] "2005-11-23 19:58:20 GMT" [1]...
2007 Jan 04
2
Seek general information about time/date storage and functions in R
Hello R List - I have to import Excel files (either as .csv files or using RODBC) into R (2.4.1, Windows) and operate on dates and times (e.g. find minutes between times, change dates to days of week or analyze by weeks of year). The help files for format.Date, strptime, as.POSIX, DateTimeClasses, etc. etc. are informative but perhaps a little terse. I have googled unsuccessfully for a more general description of how R represents times and dates, and the methods (e.g. date arithmetic) for working with them. Can a reader point out such an introduction, preferably on-line? Thank you,...
2009 May 20
2
Class for time of day?
What is the recommended class for time of day (independent of calendar date)? And what is the recommended way to get the time of day from a POSIXct object? (Not a string representation, but a computable representation.) I have looked in the man page for DateTimeClasses, in the Time Series Analysis Task View and in Spector's Data Manipulation book but haven't found these. Clearly I can create my own Time class and hack around with the internal representation of POSIXct, e.g. days <- unclass(d)/(24*3600) days-floor(days) and write print.Time, `...
2005 Jan 31
4
aggregating dates
...I have tried: aggregate(ev$date, by=list(ev$defectnum), max) Which appears to be working except that the dates seem to come back as integers (presumably the internal representation of POSIXct). When I execute max(ev$date) the result remains POSIXct. I have been dredging through the help among DateTimeClasses and haven't found a function that converts these integers to some kind of date class. Or a method for using aggregate which doesn't perform the conversion in the first place. Any clues?
2002 Jul 23
2
Converting dates?
Dear R-users I have some doubts about with converting dates... e.g. dates data 23/12/1975 0.8678 03/01/1976 0.8736 28/01/1976 0.765 13/03/1976 0,9654 ... I think that converting these dates can easily my plots... is there a R function to convert these dates to a julian dates and so plot that variables?? The help files as.POSIXlt, POSIXt and others don't aswer my doubts...
2020 Apr 06
2
Help useRs to use R's own Time/Date objects more efficiently
> (1) Create a top-level help page with a title like "Date and Time > Classes" to give a brief but general overview. This would mean the > existing DateTimeClasses would need a new title. I wanted to modify my first suggestion. Perhaps a better idea would be to reference an external document giving an overview of the subject. I couldn't find a discussion of POSIXct/POSIXlt objects in the R manuals (unless I missed it somewhere), so perhaps "An Intro...
2011 Oct 05
2
any way to convert back to DateTime class when "accidental" conversion to numeric?
...to a date time class? There are some functions, etc. which don't work well with dates, and tend to force them into numerics. I understand that the number it spits back is the number of seconds since the beginning of 1970 (see the first few sentences of the "Details" portion of ?DateTimeClasses). However, it's a bit of a hassle to convert that by hand. I can create a function to do this, and it isn't so hard, but I found it hard to believe such a function didn't already exist, so I wanted to ask the community. As an example, today (Oct 5th 2011 at approximately 4:30p...
2020 Apr 04
5
Help useRs to use R's own Time/Date objects more efficiently
...stop whining for now). In this case, I propose to slightly improve the situation ... by adding a few more lines to one help page [[how could that help in the age where "google"+"cut'n'paste" has replaced thinking ? .. ]] : On R's own ?Dates help page (and also on ?DateTimeClasses ) we have pointers, notably See Also: ............... ............... 'weekdays' for convenience extraction functions. So people must find that and follow the pointer (instead of installing one of the dozen helper packages). Then on that page, one sees weekdays(),...
2004 Mar 01
6
Find out the day of week for a chron object?
I know that this is correct: library(chron) x = dates("01-03-04", format="d-m-y", out.format="day mon year") print(x) It gives me the string "01 Mar 2004" which is correct. I also know that I can say: print(day.of.week(3,1,2004)) in which case he says 1, for today is monday. My question is: How do I combine these two!? :-) I have a
2007 Mar 19
3
R4.1: seq.POSIXt, tz="AEST" (PR#9572)
Times from seq.POSIXt come out wrong in AEST timezone around Feb 29 every leap year before 1970 (on Windows XP). According to help(DateTimeClasses), this is handled by "our own C code". > x <- as.POSIXct("1968-02-27") # tz="AEST" > x.gmt <- as.POSIXct("1968-02-27", tz="GMT") > data.frame( GMT=seq(x.gmt, by="day", length=8), byday=seq(x, by="day", l...
2016 Dec 15
2
print.POSIXct doesn't seem to use tz argument, as per its example
On the documentation page for DateTimeClasses, in the Examples section, there are the following two lines: format(.leap.seconds) # the leap seconds in your time zone print(.leap.seconds, tz = "PST8PDT") # and in Seattle's The second line (using print) seems to ignore the tz argument, and prints the dates in my time zon...
2001 Aug 02
1
conversion of time
...ting unix time, stored into a simple numeric vector, no POSIX* class inheritance of any kind. Something like crazylookingtimes_c(993340800.00, 993254400.00, 994809600.00) I'd like to convert them into a format like YYDDMMHHMMSS but I cannot find out how, at least not in the documentation on DateTimeClasses that I've skimmed. Can anybody help, please? thanks in advance claudia -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscrib...
2007 Feb 21
1
Adding difftime objects to POSIXt objects
Hello, ?DateTimeClasses states that "one can add or subtract a number of seconds or a 'difftime' object from a date-time object, but not add two date-time objects." So, is the below expected behavior? > x <- Sys.time() > x [1] "2007-02-21 16:19:56 CST" > x + as.difftime(&quot...
2007 Oct 08
2
Incompatible methods ("-.POSIXt", "Ops.difftime") for "-"
Dear all, according to the Help-page of DateTimeClasses {base} I should be able to do time - z with time date-time objects z a numeric vector (in seconds) or an object of class "difftime". However, on R version 2.6.0 (Windows XP) I get > Sys.time() - as.difftime(c("0:3:20", "11:23:15")) Time differences in mins [1]...
2003 Oct 20
1
controling x-labels in xyplot (lattice) when x is POSIX object
Hi, V1.8.0 seems to allow DateTimeClasses as the x argument in xyplots (lattice). For example: x <- seq.POSIXt(strptime("2003/01/01", format = "%Y/%m/%d"), strptime("2003/10/01", format = "%Y/%m/%d"), by = "month") y <- rnorm(length(x)) dat <- data.frame(x= x, y =...
2004 Aug 09
1
Time zones
I am analysing some data collected over a number of months from Allentown, PA, which is just north of Philadelphia. I am using as.POSIXct for dates and times, and I need to get the timezone specification correct. Going on the documentation for DateTimeClasses, I believe one way to specify the correct time zone is tz="EST5EDT" I would be grateful for any advice on this. I ask because I haven't been able to find a list of all the possible time zones or formats that can be used. I have done a bit of googling without to much success. I h...
2020 Apr 05
0
Help useRs to use R's own Time/Date objects more efficiently
...in programming language B. Any additional functionality in programming language A, should be distinct from the bindings. R hasn't done this here, where POSIX-bindings have added in additional R functionality and semantics. Possibly introducing problems at an early stage. The help file entitled DateTimeClasses, only covers a small subset of information on date and time classes, with no obvious information about how to construct date and time objects, except for what's in the examples. The Date class has a similar problem, omitting information about how to construct Date objects. The "convenienc...