When I tried Professor Ripley's example (below), the tz argument
failed to adjust clock time from UTC.
(z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000)
[1] 2006-12-06 09:42:15 UTC
format(z, %Y-%m-%d %H:%M:%OS3,tz = CET)
[1] 2006-12-06 09:42:15.729
# expected CET (Central
CET is not a valid timezone *on Windows*: please do RTFM.
E.g. ?Sys.timezone says
'Sys.timezone' returns an OS-specific character string, possibly
an empty string. It may be possible to set the timezone via the
environment variable 'TZ': see 'as.POSIXlt'. Windows is
I have a time stamp in UTC (GMT) time:
format(ISOdatetime(1970,1,1,0,0,0)+1165398135729/1000,%Y-%m-%d
%H:%M:%OS3)
2006-12-06 09:42:18.823 (note millisecond accuracy, but not relevant
to question here)
Now, this time stamp actually happened at local (Swedish) time one
hour later (10:42).
On Wed, 6 Dec 2006, Derek Eder wrote:
I have a time stamp in UTC (GMT) time:
format(ISOdatetime(1970,1,1,0,0,0)+1165398135729/1000,%Y-%m-%d
%H:%M:%OS3)
2006-12-06 09:42:18.823 (note millisecond accuracy, but not relevant
to question here)
But it is the wrong answer, and not what my
Dear Listers,
Apologize to pile up on the 'tz' issue in POSIX objects. I have a
'simple' thing on which I must make up my mind but cannot do it from the
existing R-help threads. I am currently working on dog telemetry in
China, and download time information from GPS collars. I would like to
Excellent! Thanks a lot. Solution general enough, simple and
understandable. Will try and stick on it...
Should be nice to add this simple and clear example to the as.POSIXxx
documentation.
Thanks again,
Patrick
jim holtman a écrit :
forgot, in your case it should be:
tz=chs-8chd
On 5/21/06, Patrick Giraudoux [EMAIL PROTECTED] wrote:
Excellent! Thanks a lot. Solution general enough, simple and
understandable. Will try and stick on it...
Should be nice to add this simple and clear example to the as.POSIXxx
documentation.
Note that it is system dependent. tz = and tz
On Tue, 7 Mar 2006, Jason Horn wrote:
Thank you again Gabor, that did the trick. Any thoughts on where I
go go for a reference for these time codes? Where did you get
CDT6CST from? Or is this just one of those things that is common
knowledge in UNIX circles.
To the R developers: I
On Wed, 8 Mar 2006, Don MacQueen wrote:
I would have suggested US/Central, by analogy with US/Pacific
which I use on my unix-like Mac OS X 10.3.9 system. I don't know what
might be common knowledge in UNIX circles, but here's a bit of
information from my system.
It has a directory named
I would have suggested US/Central, by analogy with US/Pacific
which I use on my unix-like Mac OS X 10.3.9 system. I don't know what
might be common knowledge in UNIX circles, but here's a bit of
information from my system.
It has a directory named /usr/share/zoneinfo.
zoneinfo[166]% pwd
The manual entry for as.POSIX says this about time zone codes...
Usage
as.POSIXct(x, tz = )
tz
A timezone specification to be used for the conversion...
but it fails to mention what these specifications are. So far, I
have tried...
as.POSIX(x, tz=UTC) ... works, gives UTC times
Whoops,
[EDIT]
as.POSIX(x, tz=UTC) ... works, gives UTC times
as.POSIX(x, tz=EST) ... works, gives EST times
as.POSIX(x, tz=CST) ... does NOT work, gives UTC times
[/EDIT]
On Mar 7, 2006, at 8:05 AM, Jason Horn wrote:
as.POSIX(x, tz=UTC) ... works, gives UTC times
as.POSIX(x, tz=UTC)
Only and GMT are really guaranteed to work on all systems
since the time zones are system dependent but try: CDT6CST
and see if that works on your system.
On 3/7/06, Jason Horn [EMAIL PROTECTED] wrote:
Whoops,
[EDIT]
as.POSIX(x, tz=UTC) ... works, gives UTC times
as.POSIX(x, tz=EST) ...
Thank you again Gabor, that did the trick. Any thoughts on where I
go go for a reference for these time codes? Where did you get
CDT6CST from? Or is this just one of those things that is common
knowledge in UNIX circles.
To the R developers: I recommend a sentence be added to the manual
Each OS would presumably have to document it. I personally
use Windows and in that case there is some info here:
http://msdn2.microsoft.com/en-us/library/90s5c885.aspx
On 3/7/06, Jason Horn [EMAIL PROTECTED] wrote:
Thank you again Gabor, that did the trick. Any thoughts on where I
go go for a
I am having trouble with creating a POSIXct object. If I create a variable
of class Date first out of the date part of my data, I am ok, but if I
just paste the date and time parts together and try and create the POSIXct
object, I have problems.
Here is a toy example created from the actual
Dear David
I tried to reproduce your example. It is not exact the same. When I create
a dataframe, character are transformed to factors except I use I() to
protect them.
PeopleData.df - data.frame(StartDate = c(29/10/2001, 7/12/2001,
16/11/2001, 28/11/2001,
PM
To: r-help@stat.math.ethz.ch
Subject: [R] POSIX problem
I am having trouble with creating a POSIXct object. If I
create a variable
of class Date first out of the date part of my data, I am ok,
but if I
just paste the date and time parts together and try and
create the POSIXct
if I have a variable of type POSIXt POSIXct like 1969-12-31
19:00:01 EST how can I dynamicly get the year (or years if vector)
and month?
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
On Thu, 9 Dec 2004, Omar Lakkis wrote:
if I have a variable of type POSIXt POSIXct like 1969-12-31
19:00:01 EST how can I dynamicly get the year (or years if vector)
and month?
See ?months, or any other official documentation on dates in R.
--
Brian D. Ripley, [EMAIL
Omar Lakkis abu3ammar at gmail.com writes:
:
: if I have a variable of type POSIXt POSIXct like 1969-12-31
: 19:00:01 EST how can I dynamicly get the year (or years if vector)
: and month?
Enter unclass(as.POSIXlt(x)) to see the components available to you
when using POSIXlt. These include
On Wed, May 19, 2004 at 03:24:38PM -0400, [EMAIL PROTECTED] wrote:
I am trying to use POSIX datetime objects rather than chron datetime
objects but am having difficulty with POSIX in a time series. My
question: Once a POSIXct vector is bound to a time series, is there a
function to convert
I am trying to use POSIX datetime objects rather than chron datetime
objects but am having difficulty with POSIX in a time series. My
question: Once a POSIXct vector is bound to a time series, is there a
function to convert back to POSIXct? The following code demonstrates
what I am trying
Is your question how to convert a vector v containing
seconds since the Epoch to POSIXct? If that's it, then
one way is:
now - Sys.time()
Epoch - now - as.numeric(now)
Epoch + v
Allen.Joel at epamail.epa.gov writes:
:
: I am trying to use POSIX datetime objects rather than chron datetime
:
Dear R People:
I have a question about POSIX. Is this an acronym for something?
If I want to refer to this in a paper, what is the proper way to do so,
please?
Thanks so much!
Sincerely,
Erin Hodgess
mailto: [EMAIL PROTECTED]
__
[EMAIL PROTECTED]
Hi
On 15 Sep 2003 at 20:09, Troels Ring wrote:
Thanks a lot, but something else may be awry ? - at least
as.POSIXct(Dato) although now of length 84 still elicits a report of
different argument lengths even though length now is 84 for both
arguments.
try
plot(as.POSIXct(Dato),Crea))
and
Dear Friends, I'm using winXP and R 1.7.1 and plotting some data using
dates on the x-axis, and wanted to use identify to show some points but was
told by identify that the x and y vectors producing a fine graph with 84
points were not equal in length. Below are the Dato for date - and
You need to convert to POSIXct before using Dato in identify().
This will work as you expected in R 1.8.0.
On Mon, 15 Sep 2003, Troels Ring wrote:
Dear Friends, I'm using winXP and R 1.7.1 and plotting some data using
dates on the x-axis, and wanted to use identify to show some points but was
Thanks a lot, but something else may be awry ? - at least as.POSIXct(Dato)
although now of length 84 still elicits a report of different argument
lengths even though length now is 84 for both arguments.
identify(as.POSIXct(Dato),Crea,5,plot=TRUE)
Error in identify(x, y, as.character(labels),
29 matches
Mail list logo