x <- data.table(...) 如要计算x的某变量a前3天(或者其他次序)到当天(lag03)的滑动均值 stats::filter(x$a/4, rep(1,4), side = 1)#side=1表示向前推。