> From: simonjk...@yahoo.ca
> Date: Tue, 18 Jan 2011 02:16:37 -0500
> To: r-help@r-project.org
> Subject: [R] Counting dates in arbitrary ranges
>
> Dear Colleagues,
> I have a data set that looks as below. I'd like to count
if you only want to count the number of days in an arbitrary time
period, you may try:
> install.packages("hydroTSM", dependencies=TRUE)
> library(hydroTSM)
> dip(from="2007-05-01", to="2009-09-10", out.type="nmbr")
I hope this helps.
Kinds,
Mauricio
--
===
Linu
Hi:
Perhaps you were looking for something like this:
table(cut(mydata[[1]], breaks=seq(from = as.Date("2008-06-26"),
to =
as.Date("2009-06-26"), by = 'month')))
2008-06-26 2008-07-26 2008-08-26 2008-09-26 2008-10-26 2008-11-26 2008-12-26
Dear Colleagues,
I have a data set that looks as below. I'd like to count the number of dates in
a series of arbitrary ranges (breaks) i.e. not pre-defined breaks such as
months, quarters or years. table(format()) produces ideally formatted output,
but table() does not appear to accept arbitrary
4 matches
Mail list logo