Message-ID: <1348673915.99376.YahooMailNeo@web190503.mail.sg3.yahoo.com>
Date: 2012-09-26T15:38:35Z
From: Eko andryanto Prakasa
Subject: averageif and looping
?haiii
i want to know, is there?any script in R to measure looping averageif (like in the excel) .......
for example:
i have a vector
row????value
1????????0
2????????2
3????????-3
4????????-2
5????????1
6????????-2
i want to measure the average of the vector for negative value with window estimation 5
so first mean is (-3+-2)/2
???? second mean is (-3+-2+-2)/3??