Displaying 20 results from an estimated 8000 matches similar to: "'col'-parameter in 'hist.POSIXt'"
2005 Jan 05
1
hist.POSIXt filled bars - axis color changes
Hi all,
I'm plotting a histogram of dates and would like to shade the bars, e.g.
hist(.leap.seconds,"years",col='gray',freq=T)
-but the axis color also changes, how do I prevent that?
thx in advance
Janus
[[alternative HTML version deleted]]
2006 Aug 25
1
How to get back POSIXct format after calculating with hist() results
Hi,
I have a casting/formatting question on hist.POSIXt:
The histogram plot from POSIXct works perfect (with help of Prof. Ripley
-thanks!).
When processing the hist(plot=FALSE) output and then plotting the
results over the x-axis (bins) coming from hist(), I lose the date/time
labels, getting instead integers displayed.
Trying to cast the $breaks with as.POSIXct gives silly results with
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
2009 Feb 17
0
Problem with +(POSIXt, difftime) dispatching -- WAS: How to create sequence of constant time interval
There seems to be a problem in the way `+` is dispatched for
POSIXt/difftime (R 2.8.0 Windows).
With the following definitions:
t0 <- as.POSIXct('2009-01-01 00:00')
halfhour.mins <- as.difftime(30,units='mins')
I would have thought that the straightforward answer to Suresh's
question would be something like
t0 + halfhour.mins * (0:47)
And indeed, if we
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
2010 Feb 01
1
Error with cut.POSIXt and daylight savings time switchover dates
The following code:
cut(as.POSIXct("2009-11-01 04:00:00", tz="America/Los_Angeles"), "1 day")
gives the error:
Error in seq.int(0, to - from, by) : 'to' must be finite
This is related to November 1st, 2009 being the switchover date from daylight savings time to standard time in the America/Los_Angeles time zone. In particular, in cut.POSIXt, the starting
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
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
>
2003 Jun 17
0
A 'pretty' function for POSIXt objects
I have written a set of functions for POSIXt objects that I would
like to offer for consideration for use in base R. They augment and
extend existing functions. Briefly,
## pretty.ct function(x,specs=pretty.ct.specs)
## round.ct function(x, tstr='1 min' )
## axis.ct function(side,x,specs=NULL,...)
## parse.timeint function(dv)
## parse.tstr
2011 Mar 23
0
suggestions re trunc.POSIXt
Dear all,
I hope this is a right place to post this; r-help might be appropriate
but it looks like I'm suggesting a change in base package, so I
decided to post here. (+ Apologies if that has been changed recently
-- the version I'm using is R.2.12.2 on Windows.)
I've noticed an unexpected behavior of trunc.POSIXt:
foo <- seq(as.POSIXct( "2009-10-23 22:00:00"),
2002 May 17
0
round.POSIXt gets certain values wrong
For certain values, round.POSIXt(tm,'day') does not round to midnight
as documented. The reason is that trunc.POSIXt() does not adjust the
value of the isdst element. Assuming my assessment of the reason is
correct, I have a potential solution to offer. Additional discussion
is in bug report #1543.
-Don
> x <- c(as.POSIXct('2001-4-1 3:15'),as.POSIXct('2001-5-2
2002 Aug 05
3
Formatting POSIXt values in plot axis labels
Hello.
I have an XYY series that I would like to graph with matplot() or some
other single function that will do the trick.
The X in question is a vector of POSIXt values obtained from strptime().
Is it possible to tell matplot() how to handle POSIXt x values?
I have examined the examples at
http://lark.cc.ukans.edu/~pauljohn/R/statsRus.html#5.22 , but would
prefer not have to overlay the
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",
2005 Apr 14
1
xtable POSIXt
Hi,
I was trying like to print out data frame with POSIXct column
in html format using xtable package, but I got error message
when trying to print the table. Here is example:
aaa<-data.frame(as.POSIXct(strptime('03 2005', '%d %Y')),0)
aaa.tab<-xtable(aaa)
print(aaa.tab)
Error in Math.POSIXt(x + ifelse(x == 0, 1, 0)) :
abs not defined for POSIXt objects
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
2011 Sep 29
1
julian day form POSIXt object
hello all,
this is my reproducible example data frame
test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000,
1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800,
1262318400, 1262318400, 1262322000, 1262322000, 1262325600, 1262325600,
1262329200, 1262329200, 1262332800, 1262332800, 1262336400, 1262336400,
1262340000, 1262340000, 1262343600,
2006 Jul 23
1
diff, POSIXct, POSIXlt, POSIXt
Dear Listers,
I have encountered a strange problem using diff() and POSIXt:
dts<-c("15/4/2003","15/7/2003","15/10/2003","15/04/2004","15/07/2004","15/10/2004","15/4/2005","15/07/2005","15/10/2005","15/4/2006")
dts <- strptime(dts, "%d/%m/%Y")
class(dts)
[1] "POSIXt"
2006 Jul 23
1
diff, POSIXct, POSIXlt, POSIXt
Dear Listers,
I have encountered a strange problem using diff() and POSIXt:
dts<-c("15/4/2003","15/7/2003","15/10/2003","15/04/2004","15/07/2004","15/10/2004","15/4/2005","15/07/2005","15/10/2005","15/4/2006")
dts <- strptime(dts, "%d/%m/%Y")
class(dts)
[1] "POSIXt"
2001 Aug 09
1
bug (and fix) in seq.POSIXt (PR#1046)
I can't reach r-project.org at the moment so cannot check whether this
is a known bug.
> version
_
platform i386-pc-mingw32
arch x86
os Win32
system x86, Win32
status
major 1
minor 3.0
year 2001
month 06
day 22
language R
The
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