hadley/plyr — Issue #68: .variables should be accessible within the scope of function
Author: leipzig
Created: 2011-11-09 20:56:46+00:00
State: open

Each piece or subframe of a split should be passed the particulars of the .variables which define that piece.

For example,
d_ply(baseball,.(team,year),function(x){print(.variables)})
[1] "BL1" "1872"
[1] "BL1" "1873"
[1] "BL1" "1874"
[1] "BR1" "1872"
[1] "BR2" "1872"
[1] "BR2" "1873"
[1] "BS1" "1873"
[1] "BS1" "1874"
[1] "BS1" "1875"
[1] "BSN" "1876"
[1] "BSN" "1877"
...