apply.fromstart function

calculate a function over an expanding window always starting from the beginning of the series