similar to: as.POSIXct questions

Displaying 20 results from an estimated 10000 matches similar to: "as.POSIXct questions"

2009 Jan 19
1
maptools, sunriset, POSIX timezones
Hi ... I wonder if anyone can provide some insight into why the first three examples using the sunriset function (appended below, with results) give the correct answer, but the fourth generates and error. The first two use ISOdatetime with and without a time zone attribute, and the sunriset function returns the correct sunset time. The third and fourth adds 10 seconds to the ISOdatetime
2005 Oct 25
2
strptime problem for 2004-10-03 02:00:00
Hello, I at first thought this was a system or locale issue, but since it occurs on both Windows and Linux and only for 2004 (AFAIK) I report it. I have a problem with as.POSIXct for the hour between "2004-10-03 02:00:00 GMT" and "2004-10-03 02:59:59 GMT". In short, the 2 AM (GMT) hour in 2004 (but not in other years) is interpreted as 1 AM by strptime: (I use ISOdatetime
2002 Apr 08
1
Problem(?) in strptime()
I think the following examples illustrate the crux of the matter (version and OS info are below). The problem has to do with the transition from standard time to daylight savings time. My timezone, US/Pacific, has two parts: standard time (PST) 8 hours behind GMT and daylight savings time (PDT) 7 hours behind GMT. The transition takes place this year on 7 April at 02:00, when 02:00 is
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
Dear list: working with date/times I have come across a problem that ISOdate and ISOdatetime are too slow on large vectors of data. I was surprised just until I looked at the implementation and the man page: "ISOdatetime and ISOdate are convenience wrappers for strptime". In other terms, they convert data to character representation first in order to create a POSIXlt object that is then
2008 Jan 27
1
bug in difftime with as.POSIXct
I am trying to do ephemeris calculations in R, which involves calculating an elapsed time. As illustrated below, difftime seems to have problems with my method, since the fractional day is sometimes the correct 0.5 and sometimes the incorrect 0.46. I am doing this on with R-2.6.1 on a powerpc-apple-darwin8.10.1 system. I get the same results for as.POSIXlt() instead of as.POSIXct(), but the
2009 Jul 24
1
adjusting grid on Xaxis ticks
Hello, I have been trying to plot correctly a graph for 2 month now, with no success.I want to put a grid, adjusted on the X axis tickers. Here is the way I build my X-Axis and my grid: grid(11, NULL, col="grey40") axis(2) # build the tickers on the beginning of each monthticks.at <- seq(ISOdatetime(lastYear, 01, 01, hour=0, min=0, sec=0, tz="GMT"),
2011 Dec 14
1
A Question Re ISOdatetime
Dear all, I am using the ISOdatetime function like this: test.info$TradeTime = with(test.info, mapply(FUN = ISOdatetime, Year, Month, Day, Hour, Minute, 60, "EST")) Where Year, Month etc are all numeric. I think ISOdatetime should return a POSIXct object. However, the result I obtained from the line above is all numeric. Could you please advise? I wish to get POSIXct. Thank you
2005 Aug 27
2
zoo, zooreg, & ISOdatetime
I create a zooreg object that runs from Jan-1-2002 0:00 to Jun-1-2005 0:00... regts.start = ISOdatetime(2002, 1, 1, hour=0, min=0, sec=0, tz="") regts.end = ISOdatetime(2005, 6, 1, hour=0, min=0, sec=0, tz="") regts.zoo <- zooreg( NA, regts.start, regts.end, deltat=3600 ) Upon inspection: > regts.zoo[1:3] 2002-01-01 00:00:00 2002-01-01 01:00:00 2002-01-01 02:00:00
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 May 10
1
System neutral Daylight Savings Time response?
I'm searching for an r command that will notify me if I create a time that does not exist due to Daylight Savings Time. For example, if I run the following command on a windows machine > ISOdatetime(2010,03,14,2,10,0, tz = "") # My system time is set to the United States Central Time Zone [1] NA R returns NA, which is the behavior I want. However, if I run the same command on a
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" >
2003 Dec 04
4
bug in as.POSIXct ?
I think that there is a bug in the as.POSIXct function on Windows. Here is what I get on Win2000, Pentium III machine in R 1.8.1. > dd1 <- ISOdatetime(2003, 10, 26, 0, 59, 59) > dd2 <- ISOdatetime(2003, 10, 26, 1, 0, 0) > dd2 - dd1 Time difference of 1.000278 hours Now, the 26th of October was the day that change to the standard time occurred, so I suspect that this has
2006 Oct 04
2
rendering date/times from 64bit julian format?
Hellos, I have date/times in 64-bit Julian format, that is the number of milliseconds since 1 jan 1970 (or something like that). E.g., "1159884877406" For the life of me I can't figure out how to render these in a more readable format, e.g., "2006-10-04 23:12:93.191" (and I have tried to do my best searching the archives and help etc ...) Thank you most
2004 Apr 23
3
time zones in POSIXt
Hi, I have two data sources. One records time in PST time zone, the other in GMT. I want to compute the difference between the two, but don't see how. Here is an example where I compute time difference between identical times each (meant to be) relative to its time zone. > as.POSIXlt("2000-05-10 10:15:00", "PST") - as.POSIXlt("2000-05-10 10:15:00",
2005 Nov 10
4
write.table read.table with Dates
I've found several similar issues with write.table/read.table with Dates on this list, but trying to follow this advice I still get an error. First, I read in data from several files, constructing several date/time columns using ISOdatetime > str(Tall$Begin) 'POSIXct', format: chr [1:40114] "2005-10-02 00:00:00" "2005-10-02 00:00:00" ... > length(Tall$Begin)
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
2008 Jan 10
2
how to calculate time offset between timezones?
#QUESTION# Is there a way to calculate the offset between timezones, e.g. from "AST" to "GMT"? #DETAILS# I am working with data files that use local time, and that indicate the timezone by e.g. "AST" (Atlantic Standard Time, my local time) in a header. I was guessing that > ISOdatetime(2008,1,1,1,0,0,tz="GMT") - >
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
2011 Jan 07
1
POSIXct issue
Hello I have trouble getting my original datetime back see below. I hope I am missing something. Please help. > tt <- as.POSIXct("2011-01-07 07:49:13", tz="EST") > tt [1] "2011-01-07 07:49:13 EST" > ttn <- as.numeric(tt) > ttn [1] 1294404553 > tt <- as.POSIXct(ttn,origin='1970-01-01',tz="EST") > tt [1] "2011-01-07
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