speed-up fix

This passes only necessary variables to ddply, which considerably speeds up the function on large data frames (from 20 seconds to 0.3 seconds, which is less time than simcf's lagpanel, on a training set of 14,137 rows and 728 variables).