similar to: lubridate, as.POSIXct and a vector of times: bug or feature??

Displaying 20 results from an estimated 8000 matches similar to: "lubridate, as.POSIXct and a vector of times: bug or feature??"

2012 Mar 30
1
lubridate:ymd_hm and coercion of class POSIXct. Smooth way to restore the date format.
Dear all, I wish to create a POSIXct variable from date and time variables using the ymd_hm function in package lubridate. In some cases data for time is missing, which causes a problem for ymd_hm. I wish to find a smooth way to handle this. # Some example data: x <- data.frame(date = c("2011-09-22", "2011-07-28"), time = c("15:00", NA)) x # paste date and
2005 Oct 17
1
as.POSIXct before and after 1970
Can someone, please, explain the difference in as.POSIXct results before 1970 and on and after 1970 as illustrated below. After 1970, the use of 'EST' or "EST+5EDT' as the timezone does not affect the result of asPOSIXct, but before 1970 on 10/28 the results are different. > as.POSIXct('1970-10-29', tz='EST')+1 [1] "1970-10-29 00:00:01 EST" >
2012 Mar 06
0
lubridate 1.1.0
#lubridate lubridate makes it easier to work with dates and times by providing functions to identify and parse date-time data, extract and modify components of a date-time (years, months, days, hours, minutes, and seconds), perform accurate math on date-times, handle time zones and Daylight Savings Time. lubridate has a consistent, memorable syntax that makes working with dates less frustrating.
2012 Mar 06
0
lubridate 1.1.0
#lubridate lubridate makes it easier to work with dates and times by providing functions to identify and parse date-time data, extract and modify components of a date-time (years, months, days, hours, minutes, and seconds), perform accurate math on date-times, handle time zones and Daylight Savings Time. lubridate has a consistent, memorable syntax that makes working with dates less frustrating.
2011 May 31
3
DateTime Math in R - POSIXct
Greetings - I'm battling POSIXct, as per the code below. My input is actually an XL file, but the weird results below correctly model what I am seeing in my program. Before I punt and use lubridate or timeDate, could anyone please help me understand why POSIXct forces my variable back to GMT? I suspect that I'm not properly coding the tzone value, but it does not throw an
2011 Aug 30
1
lubridate and intervals
Hiya, maybe there is a native R function for this and if so please let me know! I have 2 data.frames with start and end dates, they read in as strings and I am converting to POSIXct. How can I check for overlap? The end result ideally will be a single data.frame containing all the columns of the other two with rows where there were date overlaps.
2013 Jan 11
1
Date time conversion bug (as.POSIXct)?
There is something wrong, I think, with the date-time conversion from a numeric value if you use Central European Time (CET) as timezone. Examples from R: If I use the GMT time zone it is OK, I get the same time back from as.POSIXct as I entered > as.POSIXct(as.numeric(strptime("30/01/2012 13:00:00", format="%d/%m/%Y >
2010 Sep 03
1
Incorrect formatted output after subtracting non-integer seconds from POSIXt origin
> x<-as.POSIXct("1970-1-1", tz="UTC")-.5 > y<-as.POSIXct("1970-1-1", tz="UTC")+.5 > x==y [1] FALSE # of course but x and y "appear" to be the same when formatted, even with extra precision: > format(x, format="%Y-%m-%d %H:%M:%OS2") [1] "1970-01-01 00:00:00.50" > format(y, format="%Y-%m-%d
2010 Aug 31
0
New package: lubridate 0.1
Please find below the package announcement for the R package lubridate available from cran. Thank you, Garrett Grolemund Rice University ##lubridate Date-time data can be frustrating to work with in R. R commands for date-times are generally unintuitive and change depending on the type of date-time object being used. Moreover, the methods we use with date-times must be robust to time zones,
2010 Aug 31
0
New package: lubridate 0.1
Please find below the package announcement for the R package lubridate available from cran. Thank you, Garrett Grolemund Rice University ##lubridate Date-time data can be frustrating to work with in R. R commands for date-times are generally unintuitive and change depending on the type of date-time object being used. Moreover, the methods we use with date-times must be robust to time zones,
2012 Jan 11
2
lubridate does not install on FreeBSD any more
With newest R devel #sessionInfo() R Under development (unstable) (2012-01-10 r58085) Platform: amd64-portbld-freebsd10.0 (64-bit) locale: [1] de_DE.ISO8859-15/de_DE.ISO8859-15/de_DE.ISO8859-15/C/de_DE.ISO8859-15/de_DE.ISO8859-15 attached base packages: [1] stats graphics grDevices utils datasets methods base I get the following error when I try to build and install lubridate from
2010 Jan 12
0
Wishlist: Function 'difftime' to honor 'tzone' attribute (PR#14182)
Full_Name: Suharto Anggono Version: 2.8.1 OS: Windows Submission from: (NULL) (125.165.84.118) PR#14076 inspired me to write this. > t1 <- as.POSIXct("1970-01-01 00:00:00", tz="GMT") > t2 <- as.POSIXlt("1970-01-01 00:00:00", tz="GMT") > t1 - t2 Time difference of 7 hours Above, t1 and t2 represent the same time in the same specified
2010 Nov 17
0
lubridate v2.2 available on cran
Version 2.2 of the lubridate package is now available. lubridate makes it easier to work with date-time data. For example, it provides: * simple functions to extract and modify components of a date-time, such as years, months, days, hours, minutes, and seconds: year(), month(), day(), ... * quick and easy functions to parse date-times: ymd(), dmy(), mdy(), ... * helper functions for handling
2010 Nov 17
0
lubridate v2.2 available on cran
Version 2.2 of the lubridate package is now available. lubridate makes it easier to work with date-time data. For example, it provides: * simple functions to extract and modify components of a date-time, such as years, months, days, hours, minutes, and seconds: year(), month(), day(), ... * quick and easy functions to parse date-times: ymd(), dmy(), mdy(), ... * helper functions for handling
2012 Jul 19
1
as.POSIXct questions
The following three calls all produce the same result (my machine is in EST): > as.POSIXct(0, tz="", origin=ISOdatetime(1970,1,1,10,0,0)) [1] "1970-01-01 10:00:00 EST" > as.POSIXct(0, tz="EST", origin=ISOdatetime(1970,1,1,10,0,0)) [1] "1970-01-01 10:00:00 EST" > as.POSIXct(0, tz="GMT", origin=ISOdatetime(1970,1,1,10,0,0)) [1]
2009 Feb 27
0
POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59
R-devel: Some very inconsistent behavior, that I can't seem to find documented. Sys.setenv(TZ="GMT") str(unclass(strptime("1969-12-31 23:59:59","%Y-%m-%d %H:%M:%S"))) List of 9 $ sec : num 59 $ min : int 59 $ hour : int 23 $ mday : int 31 $ mon : int 11 $ year : int 69 $ wday : int 3 $ yday : int 364 $ isdst: int 0 - attr(*, "tzone")= chr
2012 Nov 16
2
lubridate concatenation issue
I took a look at Hadley's lubridate which seems a very neat package, but i am having a small problem with  concatenating lubridates to build vectors of it. Namely when function c( )  is applied to lubridate seems to change time to a local timezone in this particular case changing the date to previous one.  > d<-ymd('20111231') > d [1] "2011-12-31 UTC" > c(d) [1]
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
2013 Apr 17
1
POSIXt oddness at end of 1969
A user here noticed the following difference between Linux and Windows versions of R-2.15.3 (and R-3.0.0, I think) when using times within a second of the end of 1969: f <- function (sec = -1) { x1 <- as.POSIXct(c(2 * sec, sec, 0), origin = "1970-01-01", tz = "UTC") x2 <- as.POSIXlt(x1) x3 <- as.POSIXct(x2, origin = "1970-01-01", tz =
2006 Oct 27
2
POSIXct time zone and daylight savings issues
Hello, Suppose we need a function that takes a POSIXct object and need to calculate the time difference between it and GMT time: gmtDiff <- function(time) { time.gmt <- as.POSIXct(format(time, tz="GMT")) time.plt <- as.POSIXlt(time) dlstime <- ifelse(time.plt$isdst > 0, 1, 0) timezone <- as.numeric(difftime(time, time.gmt, units="hours"))