Calculates rolling sum of a vector across N points

rolling_sum(vec, n_points)

Arguments

vec

numeric vector across which we calculate

n_points

Value

rolled vector sum or NULL if the n_points is larger than length of the vector