similar to: chron vs. POSIX

Displaying 20 results from an estimated 8000 matches similar to: "chron vs. POSIX"

2005 May 17
2
cumsum on chron objects
Hi, Is there some alternative to cumsum for chron objects? I have data frames that contain some chron objects that look like this: DateTime 13/10/03 12:30:35 NA NA NA 15/10/03 16:30:05 NA NA ... and I've been trying to replace the NA's so that a date/time sequence is created starting with the preceding available value. Because the number of rows with NA's following each available
2003 Sep 17
3
Using POSIX?t rather than "chron" or "date"
The problem with POSIXt is that you must consider timezones and daylight vs. standard time issues even if you don't want to. This violates modularity (viz. your routines becomes coupled to unrelated information) and leads to subtle errors where different routines are assuming different time zones. The problem is that the time, date, day of the week, month, etc. of a date depend on its
2005 Aug 02
1
cut.Date functionality for chron date/time objects
Hello, I've encountered the need to cut some chron objects of the form: R> mychron <- chron(sort(runif(10, 0, 10))) R> mychron [1] (01/01/70 16:36:20) (01/02/70 00:08:46) (01/03/70 16:54:49) [4] (01/04/70 06:45:00) (01/07/70 06:21:24) (01/07/70 18:28:44) [7] (01/08/70 00:47:05) (01/08/70 05:11:44) (01/10/70 01:07:53) [10] (01/10/70 17:46:53) into arbitrary (e.g. a given number
2005 Nov 30
3
setting R_LIBS
Hello, I'm adding a private library tree in my home directory by adding this to my ~/.Renviron: R_LIBS="~/R/library:${R_LIBS}" so that once in R: R> cat(Sys.getenv("R_LIBS"), "\n") ~/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library Is this the best way to proceed? Cheers, -- Sebastian P. Luque
2001 Sep 07
1
chron is.weekend() function
Hello, I have a dataset which has fields giving both calendar date and weekday. I know better functions are now available, but I am still using chron because of the is.holiday() function and a homemade (even Heath Robinson would be ashamed) is.daylight() function. As a check for typos in the data input, I checked that the dates matched the weekdays. I'm getting some confusing results
2008 Aug 01
1
chron objects: input/output
Hi list, I have some questions regarding 1) conversion of date + time characters to chron 2) formatting chron object printing Regarding (1), Gabor's Rnews 2004 4/1 article has been indispensible, but I often work with files where dates and times are contained in a single field. In this case, I would like to control input/output of chron objects when each observation of date and time is
2006 Jun 12
1
cumulative time durations of specified periods (chron)
Hi, Say we have two chron vectors representing start and end date/times of an event, respectively: R> (xfrom <- chron(seq(1.25, 11, 3.25))) [1] (01/02/70 06:00:00) (01/05/70 12:00:00) (01/08/70 18:00:00) [4] (01/12/70 00:00:00) R> (xto <- chron(as.numeric(xfrom) + seq(1.5, 2.25, 0.25))) [1] (01/03/70 18:00:00) (01/07/70 06:00:00) (01/10/70 18:00:00) [4] (01/14/70 06:00:00) and we
2008 May 14
1
Time differences (as.difftime?) issue
Dear all, I have a vector generated using the function strptime: > my.dt [1] "2004-04-19 08:35:00 W. Europe Daylight Time" "2004-04-19 09:35:00 W. Europe Daylight Time" "2004-04-19 11:35:00 W. Europe Daylight Time" [4] "2004-04-19 13:35:00 W. Europe Daylight Time" "2004-04-20 07:50:00 W. Europe Daylight Time" > class(my.dt) [1]
2004 Apr 29
1
Entering times around the start of daylight savings time
I'm having problems entering dates and times around when daylight savings time starts. If I type (on R 1.8.1 on Gentoo Linux) > ISOdatetime(2004,4,4,0:4,0,0,"GMT") [1] "2004-04-03 19:00:00 EST" "2004-04-03 20:00:00 EST" [3] "2004-04-03 22:00:00 EST" "2004-04-03 22:00:00 EST" [5] "2004-04-03 23:00:00 EST" Giving the times
2005 May 11
2
time zones, daylight saving etc.
Hi, I have a whole bunch of data, which looks like: 15/03/2003 10:20 1 15/03/2003 10:21 0 15/03/2003 12:02 0 16/03/2003 06:10 0 16/03/2003 06:20 0.5 16/03/2003 06:30 0 16/03/2003 06:40 0 16/03/2003 06:50 0 18/03/2003 20:10 0.5 etc. (times given on a 24 hour clock) and goes on for years. I have some code:
2004 Mar 05
3
as.POSIXct problem
Hi all, I'm having difficulty converting a 'dates' object to a POSIXct object: testDATES<-c(35947,35971,36004,36008,36053,36066) testDATES<-chron(dates=testDATES, format = c(dates = "m/d/y"), origin=c(month = 12, day = 30, year = 1899)) >[1] 06/01/98 06/25/98 07/28/98 08/01/98 09/15/98 09/28/98 > as.POSIXct(testDATES) [1] NA NA NA NA NA NA
2004 Nov 11
2
RODBC & POSIX & Daylight Saving blues
Dear All, The recent improvement in RODBC to recognize datetimes in tables has exposed my ongoing confusion. All my data are obtained from a satellite system (Argos) which tags events in the GMT time zone. Daylight saving is ignored. To my way of thinking this means that 1. twelve-o-clock means halfway through the day regardless of season, and 2. the difftime of any two dates where
2005 Nov 16
1
COM dates (was origin and "origin<-" in chron)
I was just looking for an easy way to convert between COM datetime and chron datetime (both ways.) I found examples on the list, but they involved origin. Does anyone have functions for converting COM datetime <-> chron datetimethat work "safely"? David L. Reiner > -----Original Message----- > From: Gabor Grothendieck [mailto:ggrothendieck@gmail.com] >
2004 Mar 06
0
Summary: as.POSIXct
Suggestions from both Prof Brian Ripley and Gabor Grothendiec solved my problem. From Prof Ripley: >This is a problem of your OS: your example works on all of mine. > >Can't you change the origin in chron? If not, you should certainly be >able to do > >as.POSIXct(strptime(as.character(testDATES), "%m/%d/%y")) This still resulted in NA's on my system. >
2011 Aug 30
3
having trouble extracting week from chron object
Running R 2.13.1 on Windows XP. I would like to get week of the year (1-52) for each date. library(chron) dts <- dates(c("02/27/92", "02/27/92", "01/14/92","02/28/92", "02/01/92")) dts dts.chron <- as.chron(dts) dts.chron class(dts.chron) # all of these component extractions work: months(dts.chron) weekdays(dts.chron) years(dts.chron)
2002 Oct 18
1
Chron problem with R 1.6.0 (PR#2181)
Full_Name: Rick Bilonick Version: 1.6.0 OS: Linux (RH 7.1) Submission from: (NULL) (12.4.226.1) Hi. I'm using Red Hat 7.1 Linux (Intel 586). I installed the 1.6.0 rpm. No problems were reported. When I tried to load the chron library: Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/usr/lib/R/library/chron/libs/chron.so":
2012 Jun 15
2
time zones and the chron to POSIXct conversion
Hey R folks, i found some strange (to me) behaviour with chron to POSIXct conversion. The two lines of code result in two different results, on ewith the correct time zone, one without: library(chron) as.POSIXct(chron('12/12/2000'), tz = 'UTC') as.POSIXlt(chron('12/12/2000'), tz = 'UTC') Only the code below would give me a POSIXct object with the correct time
2003 Jul 31
4
timezones
I have some questions and comments on timezones. Problem 1. # get current time in current time zone > (now <- Sys.time()) [1] "2003-07-29 18:23:58 Eastern Daylight Time" # convert this to GMT > (now.gmt <- as.POSIXlt(now,tz="GMT")) [1] "2003-07-29 22:23:58 GMT" # take difference > now-now.gmt Time difference of -5 hours Note that the difference
2005 Jun 01
2
problem with chron scales in lattice
I can't get the scales parameter in xyplot of lattice to work as I expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year labels from 1992 to 2004 for the x axis in the plot below, but instead only a few of them appear, and in the wrong spots, as if the coordinate system has changed after finishing with the panel function. library(chron) library(lattice) # vertical grid
2011 Sep 16
1
Mystified - comparing chron times
I have two local variables: startTime and expectedStartTime. Both are chron related objects. When I look at the class for the objects I can see they are of class "times". When I print them to the console, they both read: "09:30:00" When I print them as.numeric(), they both read: 0.3958333 When I try and compare them: (as.numeric(startTime) == as.numeric(expectedStartTime)) it