[GRASS-stats] sequence of dates by one hour
Matteo Dall'Amico
matteo.dallamico at ing.unitn.it
Tue Jan 15 12:06:19 EST 2008
Hello,
I need to create a sequence of dates separated by one hour.
I found in the examples of axis.POSIXct() that it is possible to
create it:
Examples
with(beaver1, {
time <- strptime(paste(1990, day, time %/% 100, time %% 100),
"%Y %j %H %M")
plot(time, temp, type="l") # axis at 4-hour intervals.
# now label every hour on the time axis
plot(time, temp, type="l", xaxt="n")
r <- as.POSIXct(round(range(time), "hours"))
axis.POSIXct(1, at=seq(r[1], r[2], by="hour"), format="%H")
})
I tried, but I received the error:
date_graph_in<-chron("1/11/1907","00:39:00",format = c(dates = "d/m/
y", times = "h:m:s"));
date_graph_fin<-chron("1/11/1998","00:39:00",format = c(dates = "d/m/
y", times = "h:m:s"));
data_seq<-seq(date_graph_in,date_graph_fin,by="hour")
Error in seq.dates(date_graph_in, date_graph_fin, by = "hour") :
"by" must be one of days, weeks, months, or years
It seems it is possible to create date sequences separated of days,
weeks, months or years but not for hours.
Does someone know how to do it?
Thanks in advance,
Matteo
---------------------------------
Matteo Dall'Amico
PhD candidate
CUDAM and department of Civil and Environmental Engineering
Universita' degli Studi di Trento
Via Mesiano 77 - 38050 Trento - Italy
email: matteo.dallamico at ing.unitn.it
Tel. +39 0461 882610
Fax +39 0461 882672
http://www.dottorato.it/trento/
---------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-stats/attachments/20080115/0001022f/attachment.html
More information about the grass-stats
mailing list