[R] Identifying peaks (or offsets) in a time series

Tauber, Dr E. et22 at leicester.ac.uk
Mon Jul 24 17:16:07 CEST 2006

Dear R-users,

We are monitoring the activity of animals during a few days period. The
data from each animal (crossing of infra-red beam) are collected as a
time series (in 30 min bins). An example is attached below.

y <-
We would like to have an automatic way, using R, to identify the time
point of offset of each bout of activity (i.e. when activity goes down
to a minimum value, for a defined duration). In the example above the
offset times (the element number) should be approximately: 53, 99, 146,
191, 239, 283, 330 (the last bout of activity can be ignores). 
Any help or advice will be greatly appreciated, 

Many thanks, Eran

Eran Tauber (PhD)
Lecturer in Molecular Evolution
Dept. of Genetics
University of Leicester
University Rd, Leicester LE1 7RH
Phone: 44 (0)116 252-3455, 252-3421 (lab) Fax: 44 (0)116 252-3378

More information about the R-help mailing list