similar to: Error with cut.POSIXt and daylight savings time switchover dates

Displaying 20 results from an estimated 6000 matches similar to: "Error with cut.POSIXt and daylight savings time switchover dates"

2002 May 12
0
{round,trunc}.POSIXt and daylight savings time (PR#1543)
I have found what looks like a small problem in trunc.POSIXt() involving the transition to/from standard time and daylight savings time. Assuming my assessment is correct, I have a potential solution to offer. If a time in daylight savings time is rounded such that the rounded value is on the other side of the transition, the isdst element does not get changed accordingly. I have tested only
2002 May 03
1
Daylight savings time and conversion to POSIXt (arghh!)
I have asked this question before, and received some suggestions for work-arounds that get the job done--and they are much appreciated. But I would still like to find out if I'm missing something, and whether there is a direct way using POSIXt functions (as.POSIXct, as.POSIXlt, strptime, in particular). I have environmental data collected once per minute. Here is a subset of 3 input
2009 Oct 15
2
forwarded: bug (?) in cut.POSIXt with "breaks"=integer
From: Vitalie S. <vitosmail <at> rambler.ru> Subject: Bug in cut.POSIXt Newsgroups: gmane.comp.lang.r.general Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago) Hello Everyone, Before reporting decided to post here first: tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class = c("POSIXt",
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
2011 Feb 14
3
how to order POSIXt objects ?
I have a problem ordering by descending magnitude a POSIXt object. Can someone help please and let me know how to work around this. My goal is to be able to order my data by DATE and then by descending TIME. I have tried to include as much info as possible below. The problem stems from trying to read in times from a CSV file. I have converted the character time values to a POSIXt object using the
2010 Mar 10
4
cut.POSIXt misconception/feature/bug?
Dear all recently I tried to split vector of dates according to some particular date to 2 (more) chunks, but I was not able to perform correct setting. When I want split to 3 chunks it partially works however from help page I supposed to get result without NA. Details: Using both ?right = TRUE? and ?include.lowest = TRUE? will include both ends of the range of dates. dat <-
2013 Aug 22
1
From POSIXct to numeric and back with time zone
From POSIXct to numeric and back with time zone I am running regressions on data which has time series with different time resolution. Some data has hourly resolution, while most has either daily or weekly resolution. Aggregation is used to make the hourly data daily, while liner interpolation is used to find daily data from the weekly time series. This data manipulation requires some careful
2017 Apr 06
1
[bug] in cut.POSIXt(..., breaks = <numeric>)
The exact error was reported before in *Bug 14288* <https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14288> *- **bug in cut.POSIXt(..., breaks = <numeric>) and cut.Date. *But the fix in that bug report only covered the simplest case. This is the error I met ----------------------------- x <- structure(c(1057067700, 1057215720, 1060597800, 1061470800, 1061911680, 1062048000,
2007 Jan 04
3
problem with plot() and POSIXt dates
Hy all, I'm plotting graphs using plot() function, they are on X axes POSIX dates: "POSIXt" "oldClass" "POSIXct" "POSIXlt" I can't figure out why sometimes it prints the month and days and sometimes it prints the unix timestamp. It appens usually when the xlim is short like only some days. xlim is settled as a POSIXt like this "2006-12-30
2012 Nov 05
1
Dates as POSIXt
When I try to do linear interpolation between financial contracts with maturities on different dates in different months I have come across some behavior I haven't seen before. I have a data frame in R which is loaded from an access database so I can't provide a working example. It was loaded using this code: > dbPath <- "H:/pathToDB/DB.mdb" > channel <-
2008 Mar 18
4
cut.Date and cut.POSIXt problem
cut.Date and cut.POSIXt indicate that the breaks argument can be an integer followed by a space followed by "year", etc. but it seems the integer is ignored. For example, I assume that breaks = "3 months" is supposed to cut it into quarters but, in fact, it cuts it into months as if 3 had not been there. > d <- seq(Sys.Date(), length = 12, by = "month") >
2004 Mar 30
1
seq.POSIXt() bug not fixed in R 1.8.1 (PR#4558)
I am still experiencing problems with seq.POSIXt() missing off the last day of the series: > seq(as.POSIXct("2004-03-25"),as.POSIXct("2004-03-31"),by="DSTdays") [1] "2004-03-25 GMT Standard Time" "2004-03-26 GMT Standard Time" "2004-03-27 GMT Standard Time" [4] "2004-03-28 GMT Standard Time" "2004-03-29 GMT Daylight
2009 Sep 09
1
Monkey patching +.POSIXt
Hi all, This summer I've been working with a grad student to bring more of the date time classes from JODA (http://joda-time.sourceforge.net/) into R. To make these work seamlessly with existing date time objects, we need to patch +.POSIXt. (The ruby community uses the term monkey-patching for this sort of ill-advised, by sometimes necessary, internal hackery, hence the title.) The problem is
2002 Mar 26
1
seq.POSIXt() with short time intervals
I was surprised when seq.POSIXt() returned a single value rather than a vector, from inputs that I thought were reasonable. Here's an example to illustrate: > t0 <- ISOdatetime(2002,6,24,0,0,10) ## expected a sequence of 16 times 1 second apart > seq.POSIXt(from=t0,to=t0+15,by='1 sec') [1] "2002-06-24 00:00:10 PDT" ## traces to this call >
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("1","%H") [1] "2007-02-21 16:19:57 CST" Warning
2006 Dec 07
2
Matplot does not work with x being POSIXt class (PR#9412)
Hi, Matplot works with x being Date class but not POSIXt. Here is the example with R version 2.5.0 Under development (unstable) (2006-12-06 r40129) Example: x <- Sys.Date() - c(1:10) y <- cbind(1:10, 10:1) class(x) ## [1] "Date" matplot(x, y) x <- strptime(as.character(x), format="%Y-%m-%d") ## [1] "POSIXt" "POSIXlt" matplot(x, y) Error in
2010 Apr 29
1
bug in cut.POSIXt(..., breaks = <numeric>) and cut.Date
x <- seq(as.POSIXct("2000-01-01"), by = "days", length = 20) cut(x, breaks = 3) # Error in `levels<-.factor`(`*tmp*`, value = character(0)) : # number of levels differs cut(as.Date(x), breaks = 3) # Error in `levels<-.factor`(`*tmp*`, value = character(0)) : # number of levels differs Index: base/R/datetime.R
2012 Jul 02
1
Undocumented behavior around daylight savings time?
Apologies for the intrusion. I am a lurker on list. I have been working to convert a digitized signal from a matlab file into R for analysis and other applications. R.matlab is working fine, and it is easy to convert the matlab date-time number (days since year 0) into R date-time numbers (seconds since 1970-01-01). Unfortunately, when I cast the R date-time number into POSIXct format it seems
2007 Dec 11
3
Wrong length of POSIXt vectors (PR#10507)
Full_Name: Petr Simecek Version: 2.5.1, 2.6.1 OS: Windows XP Submission from: (NULL) (195.113.231.2) Several times I have experienced that a length of a POSIXt vector has not been computed right. Example: tv<-structure(list(sec = c(50, 0, 55, 12, 2, 0, 37, NA, 17, 3, 31 ), min = c(1L, 10L, 11L, 15L, 16L, 18L, 18L, NA, 20L, 22L, 22L ), hour = c(12L, 12L, 12L, 12L, 12L, 12L, 12L, NA, 12L,
2007 Aug 08
2
Error: Cannot Coerce POSIXt to POSIXct when building package
A newbie here - please forgive me if this is a basic question. We have an in house package built in R 2.2.1 (yes we're a little behind the times at our firm)and would like to rebuild it using R 2.5.1. However, when I try and build the package from source, I keep getting this error: Error in as(slotVal, slotClass, strict = FALSE) : no method or default for coercing "POSIXt"