similar to: as.POSIXct problem

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

2004 Mar 06
0
Summary: as.POSIXct
Suggestions from both Prof Brian Ripley and Gabor Grothendiec solved my problem. From Prof Ripley: >This is a problem of your OS: your example works on all of mine. > >Can't you change the origin in chron? If not, you should certainly be >able to do > >as.POSIXct(strptime(as.character(testDATES), "%m/%d/%y")) This still resulted in NA's on my system. >
2004 May 27
2
axis.POSIXct: Datetime data and plotting
I've run into a problem with the datetime axis generated by axis.POSIXct. It appears a similar issue was discussed in October 2003 under the subject line "datetime data and plotting" (see https://stat.ethz.ch/pipermail/r-help/2003-October/039071.html), but I wasn't able to determine whether there is a straightforward solution. The code below produces a graph with apparently
2005 May 11
2
time zones, daylight saving etc.
Hi, I have a whole bunch of data, which looks like: 15/03/2003 10:20 1 15/03/2003 10:21 0 15/03/2003 12:02 0 16/03/2003 06:10 0 16/03/2003 06:20 0.5 16/03/2003 06:30 0 16/03/2003 06:40 0 16/03/2003 06:50 0 18/03/2003 20:10 0.5 etc. (times given on a 24 hour clock) and goes on for years. I have some code:
2003 Jul 31
4
timezones
I have some questions and comments on timezones. Problem 1. # get current time in current time zone > (now <- Sys.time()) [1] "2003-07-29 18:23:58 Eastern Daylight Time" # convert this to GMT > (now.gmt <- as.POSIXlt(now,tz="GMT")) [1] "2003-07-29 22:23:58 GMT" # take difference > now-now.gmt Time difference of -5 hours Note that the difference
2007 Jul 31
1
POSIXct Formating Error (PR#9819)
To Whom It May Concern: The following appears to be a bug in the way POSIXct dates are formated. The example is forced, but occurs naturally when importing Excel type dates (where fractional part is fraction of a day) and small rounding errors result. As shown, looking at the POSIXct class, it looks as if both times are 16:11:03 (truncation) Looking at as.numeric.POSIXct, it looks as if
2004 Aug 17
3
Fwd: strptime() problem?
Hi all; I've already send a similar e-mail to the list and Prof. Brian Ripley answered me but my doubts remain unresolved. Thanks for the clarification, but perhaps I wasn't clear enough in posting my questions. I've got a postgres database which I read into R. The first column is Timestamp with timezone, and my data are already in UTC format. An 'printed' extract of R
2003 Nov 12
3
Chron, as.POSIXct problem
Dear R list, I noticed the following 'problem' when changing the format of dates created with seq.dates() (from the Chron library) using as.POSIXct() (R 1.8.0 on OSX 10.2.8): > datesTest<-seq.dates(from="10/01/1952", length=3, by="days"); > datesTest [1] 10/01/52 10/02/52 10/03/52 # Now changing the format to show year as 1952. >
2003 Oct 17
7
datetime data and plotting
If I take the following simple data: YEAR MONTH DAY WEIGHT.KG 2003 10 6 1.2 2003 10 12 1.2 2003 10 16 1.3 and format the date data and plot it: dates <- strptime(paste(DAY,MONTH,YEAR),"%d%m%Y") plot(c(min(dates),max(dates)),c(0,max(WEIGHT.KG)), xlab="Date",ylab="Weight (kg)",type="n") lines(dates,WEIGHT.KG) points(dates,WEIGHT.KG) I find that the
2003 Dec 04
5
Processing calendar dates with R
I am a beginner in R with a background in SAS. Are there built-in R methods of reading dates for calculating elapsed days between two calendar dates? If so, are there any examples I can browse? Thanks in anticipation. John Byrne. Lecturer in Information Systems. Australian Catholic University.
2004 Mar 22
2
Date operations
Hello: Thanks in advance for your time ? I am having a data.frame with one of the columns containing the weeks as follows. How can I do the following in the most efficient way ? 1. Find the minimum date ? 2. Find the maximum date ? 3. How do we sort based on ascending order the date ? An example as follows. Week 1-Jan-01 (<----- MIN DATE) 7-Jan-01 14-Jan-01 21-Feb-01 (<----- MAX DATE)
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
2006 Nov 27
2
as.Date: conversion pb from POSIXct (PR#9386)
Full_Name: Xiao Gang FAN Version: 2.4.0 OS: Windows Submission from: (NULL) (159.50.101.9) > library(chron) > as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d"))) [1] "1994-01-23"
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
2003 Sep 02
1
convert character to POSIXct
Dear list-members, I would like to calculate the difference between two points in time. To convert a 'time (GMT)'-character with the format "1/1/1999 01:01:01" into an object of class "POSIXct"', I first use the strptime() as suggested in the details help(as.POSIXct). e.g. starttime<-strptime("1/1/1999 01:01:01",format="%d/%m/%Y %H:%M:%S")
2004 Apr 22
3
POSIXct vs Dates
I noticed the addition of the Dates class for dates without times, in R 1.9. I am making extensive use of POSIXct at present and would like to know whether it is worth changing to Dates. What are a few of the trade-offs? Thanks, Frank --- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
2008 May 14
1
Time differences (as.difftime?) issue
Dear all, I have a vector generated using the function strptime: > my.dt [1] "2004-04-19 08:35:00 W. Europe Daylight Time" "2004-04-19 09:35:00 W. Europe Daylight Time" "2004-04-19 11:35:00 W. Europe Daylight Time" [4] "2004-04-19 13:35:00 W. Europe Daylight Time" "2004-04-20 07:50:00 W. Europe Daylight Time" > class(my.dt) [1]
2007 Apr 04
1
time zone problems
Folks, I'm having trouble with how datetime objects with time zones are set and plotted. This may be the result of my running R (2.4.0) on a Windoze XP box. Perhaps not. Here are two example problems I need advise on if you have time: 1) I collect data with dates (often as a fractional day of year) in UTC. Using strptime to create date time objects appears to force the data into
2011 Sep 22
2
Problems with as.POSIXct
Hi R users: This is a very strange problem: Why this instruction shows me NA?, and any other date shows me that error! as.POSIXct(strptime("1992-5-3",format="%Y-%m-%d")) This is my R version on windows 7. "R version 2.13.1 Patched (2011-08-25 r56794)" Thank you for your help.
2003 Sep 17
3
Using POSIX?t rather than "chron" or "date"
The problem with POSIXt is that you must consider timezones and daylight vs. standard time issues even if you don't want to. This violates modularity (viz. your routines becomes coupled to unrelated information) and leads to subtle errors where different routines are assuming different time zones. The problem is that the time, date, day of the week, month, etc. of a date depend on its
2004 May 19
2
POSIX to ts and back to POSIX
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 to do. > ts(as.POSIXct(strptime(tmp,"%m/%d/%Y %H:%M:%S")),freq=1440) Time Series: Start =