Hello,

You should provide us with a data example. Since you haven't, look at the following code and see if you understand it.

# Make up some data
x <- Sys.time() + (1:1000)*15
y <- rnorm(1000)

brks <- cut(x, breaks = "hour")  # hour breaks
tapply(y, brks, mean)   # hourly means of 'y'


Hope this helps,

Rui Barradas
Em 06-11-2012 18:57, B. Bahar escreveu:
Hello,

I have much more than one milion tempreture is gained each 15 seconds. So
each 15 seconds, I have one data.
How could I calculate avarage datas in each hour in R?

If you could help me.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to