William thanks a lot that is exactly what I wanted! :working: -- View this message in context: http://n4.nabble.com/Counting-Na-values-on-a-time-serie-only-on-the-past-datas-tp1101617p1103103.html Sent from the R help mailing list archive at Nabble.com.