similar to: Questions about doing analysis based on time

Displaying 20 results from an estimated 20000 matches similar to: "Questions about doing analysis based on time"

2011 Feb 04
2
terribly annoying bug with POSIXlt : one o'clock is midnight?
Apparently, as.POSIXlt takes one o'clock as the start of the day : > as.POSIXlt(0,origin="1970-01-01") [1] "1970-01-01 01:00:00 CET" > as.POSIXlt(0,origin="1970-01-01 00:00:00") [1] "1970-01-01 01:00:00 CET" > as.POSIXlt(0,origin="1970-01-01 23:59:59") [1] "1970-01-02 00:59:59 CET" Cheers -- Joris Meys Statistical
2008 Jun 20
1
Some help with dates.
Hey, I'm new to R but familiar with other programming languages. Basically, I want to store an array of dates. For each of these dates I want to store only the day of the week and the hour. So for example: "Monday 12" would be Monday at 12 o'clock and "Tuesday 20" would be Tuesday at 8 p.m. Alternatively it could be stored as 0-6 for Sunday to Saturday. So Tuesday
2005 Jul 17
1
Where to learn how to deal with time class variable?
Dear R-helpers, In my data set, I have a time variable 'RecordTime' whose class property is 'times'. When I list my data set, I see the values of RecordTime is like 10:20:30 in a 'h:m:s' format. Suppose I want to choose all the data after 10 o'clock, then use subset(data,RecordTime>10:20:30) just doesn't work. I noticed that all the values of RecordTime seem
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create objects of class AsIs: > I("a") [1] "a" attr(,"class") [1] "AsIs" "character" > I(4) [1] 4 attr(,"class") [1] "AsIs" "numeric" > I(4 + 0i) [1] 4+0i attr(,"class") [1] "AsIs" "complex" > This
2017 Oct 14
2
Another issue with Sys.timezone
(I reported the test failure mentioned below to R-help but was advised that this list is the right one to address the issue; in the meantime I investigated the matter somewhat more closely, including searching recent R-devel postings, since I haven't been following this list.) Last May there were two reports here of problems with Sys.timezone, one where the zoneinfo directory is in a
2017 Oct 18
2
Another issue with Sys.timezone
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Mon, 16 Oct 2017 19:13:31 +0200 writes: >>>>> Stephen Berman <stephen.berman at gmx.net> >>>>> on Sun, 15 Oct 2017 01:53:12 +0200 writes: > > (I reported the test failure mentioned below to R-help but was advised > > that this list is
2011 Mar 24
5
subset and as.POSIXct / as.POSIXlt oddness
Dear R users, Given this data: x <- seq(1,100,1) dx <- as.POSIXct(x*900, origin="2007-06-01 00:00:00") dfx <- data.frame(dx) Now to play around for example: subset(dfx, dx > as.POSIXct("2007-06-01 16:00:00")) Ok. Now for some reason I want to extract the datapoints between hours 10:00:00 and 14:00:00, so I thought well: subset(dfx, dx >
2020 Oct 23
2
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
Dear all, I have just detected what seems a minor inconsistence with data types. If one unlists a POSIXlt time with GMT zone gets a numeric vector, since the POSIXlt list has no `zone` element, while if one unlists a POSIXlt time with a non GMT zone (also non specifying tz if the Sys.timezone is not GMT) gets a character vector due to including the `zone` element. > x <-
2003 Aug 13
1
Problems with addition in big POSIX dates
Have you noticed any problems with big dates (>=1/1/2040) in R? Here is the bit of code that I'm having trouble with: > test.date <- strptime("1/1/2040",format="%m/%d/%Y") > > unlist(test.date) sec min hour mday mon year wday yday isdst 0 0 0 1 0 140 0 0 0 > > date.plus.one <- as.POSIXct(test.date) +
2006 Jan 09
3
two y-axis in xy-plot
Hi there, I am wondering if it is possible to do an xyplot with two y-axes. I'd like to print two parameters in a time series but they both have different scales. Which parameter in xyplot can I add to achieve this result? Thanks a lot for any help. Antje [[alternative HTML version deleted]]
2008 Dec 09
1
Voicemail.conf : concise hour prompts
Hi, In voicemail.conf: ; Supported values: ; 'filename' filename of a soundfile (single ticks around the filename ; required) ; ${VAR} variable substitution ; A or a Day of week (Saturday, Sunday, ...) ; B or b or h Month name (January, February, ...) ; d or e numeric day of month (first, second, ..., thirty-first) ; Y Year ; I or l
2009 Jan 28
2
length of POSIXlt object (PR#13482)
The length() of a POSIXlt object is given as 9 regardless of the actual length. For example: > make.date.time function (year=c(2006,2006),month=c(8,8),day=2:5,hour=13,minute=45) {# convert year, etc., into POSIXlt object # d=as.character(make.date(year,month,day)) t=paste(hour,minute,sep=":") as.POSIXlt(paste(d,t)) } > t=make.date.time() > t [1] "2006-08-02 13:45:00"
2020 Oct 01
3
timezone tests and R-devel
The return value of Sys.time() today with a timezone of US/Eastern is unchanged between 4.0.3-patched and devel, but on devel the following test fails all.equal(x, as.POSIXlt(x)) with x = Sys.time() This means that devel does not complete make tests (failure on tests/reg-tests-2.R) It is entirely possible that it is an error on my end, I use export TZ="US/Eastern" but I have been
2010 Jun 15
3
Problem with as.POSIXlt$hour
Hello, In one of my functions, I need to extract the hour from a date. For example: as.POSIXlt("2010-03-27 02:00:00")$hour gives 2 as expected. It works for all the dates I've tested except the following one which is in my list of dates: as.POSIXlt("2010-03-28 02:00:00")$hour which gives 0. I don't understand why it doesn't work with this particular date. Any
2020 Oct 02
2
timezone tests and R-devel
Yes, the potential issue I see is that make check fails when I explicitly set TZ. However, I set it to be the same as what the system reports when I login. Details: The system (RHEL) I am working on has $ strings /etc/localtime | tail -n 1 EST5EDT,M3.2.0,M11.1.0 $ date +%Z EDT $ echo $TZ US/Eastern On Fri, Oct 2, 2020 at 9:48 AM Sebastian Meyer <seb.meyer at fau.de> wrote: > Thank
2009 Dec 22
1
as.Date function yields inconsistent results (PR#14166)
Full_Name: Mario Luoni Version: 2.10.0 OS: Windows XP HE SP3 Submission from: (NULL) (217.194.59.134) This piece of code: zzz1 <- as.POSIXct("1999-03-18", tz="CET") zzz2 <- as.POSIXlt("1999-03-18", tz="CET") zzz1 == zzz2 as.Date(zzz1) as.Date(zzz2) yields TRUE for "zzz1==zzz2", but the two dates returned by as.Date are different: >
2005 Dec 22
1
panel order in xyplot
Hi all, I have a question concerning xyplot. My data is a data.frame looking like that: In the first column I have numbers from 0 to 23 (hours of a day), the second column contains the name of a weekday (Day as factor) and the third column contains the number I am interested in. So as an example, the first five rows look like that: Hour Day Freq 1 0 Mo 23 2 1 Mo
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here: $ > tail reg-tests-1d.Rout.fail -n 16 > ## format()ing invalid hand-constructed POSIXlt objects > d <- as.POSIXlt("2016-12-06"); d$zone <- 1 > tools::assertError(format(d)) > d$zone <- NULL > stopifnot(identical(format(d),"2016-12-06")) > d$zone <- "CET" # =
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here: $ > tail reg-tests-1d.Rout.fail -n 16 > ## format()ing invalid hand-constructed POSIXlt objects > d <- as.POSIXlt("2016-12-06"); d$zone <- 1 > tools::assertError(format(d)) > d$zone <- NULL > stopifnot(identical(format(d),"2016-12-06")) > d$zone <- "CET" # =