Dear all, I am pretty new to R only having an introduction course, so please bare with me. I am doing my PhD at The Max Planck Institute of Immunobiology where I am analyzing some calorimetry data from some mice. I have a spreadsheet consisting of measurements of the respiratory exchange rate at different time points measured every 9 minutes over some days. My goal is "bin"/average the time points of each hour to only one measurements.
E.g. [Time] - [Measurement] 12.09 - 0.730 12.18 - 0.732 12.27 - 0.743 12.36 - 0.757 12.45 - 0.781 12.54 - 0.731 --> should be averaged to fx one time point and one value, fx: 12.30 - [average of the six measurements] I know how to average the measurements in a whole column but how to average every six measurements automatically and also how to average every six time points and make a new sheet consisting of these data? I hope you guys are able to help, since we are really stuck here. I can of course do it manually but with >8000 measurements it will take lots of time. Thank you very much. Best regards, Kevin Dalgaard -- View this message in context: http://r.789695.n4.nabble.com/How-to-bin-average-time-points-tp3059509p3059509.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.