cumplyr-package: Extends ddply to allow calculation of cumulative quantities.

Description Details Author(s) Examples

Description

Extends ddply to allow calculation of cumulative quantities.

Details

Package: cumplyr
Type: Package
Version: 0.1-1
Date: 2012-05-02
License: MIT

Author(s)

John Myles White

Maintainer: John Myles White <jmw@johnmyleswhite.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library('cumplyr')

data(rt.data)

results <- cumddply(rt.data,
                    c('Subject', 'Block'),
                    c('Trial'),
                    function (df) {with(df, mean(RT))})

print(results)

Example output

   Subject Block Trial func(local.data)
1        1     1     1        0.5000000
2        1     1     2        0.7500000
3        1     1     3        1.0000000
4        1     2     1        0.5000000
5        1     2     2        0.5000000
6        1     2     3        0.5833333
7        2     1     1        1.0000000
8        2     1     2        1.5000000
9        2     1     3        2.0000000
10       2     2     1        0.5000000
11       2     2     2        0.7500000
12       2     2     3        1.1666667

cumplyr documentation built on May 2, 2019, 2:13 p.m.