move rollapply from utils.r to functionals.r