Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An extension of plyr that uses inequality constraints.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 R
Octocat-spinner-32 benchmarks
Octocat-spinner-32 data
Octocat-spinner-32 man
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 BUGS.md
Octocat-spinner-32 DESCRIPTION
Octocat-spinner-32 NAMESPACE
Octocat-spinner-32 README.md
Octocat-spinner-32 TODO.md
Octocat-spinner-32 build_script.sh
Octocat-spinner-32 cumplyr_0.1-1.tar.gz
README.md

An Extension of plyr to Overlapping Data Problems

Usage Example

Compute a running mean within each subset of trials in the current block using all trials before the current trial:

library('cumplyr')

data(rt.data)

print(rt.data)

results <- iddply(rt.data,
                  equality.variables = c('Subject', 'Block'),
                  upper.bound.variables = c('Trial'),
                  func = function (df) {with(df, mean(RT))})

names(results) <- c('Subject', 'Block', 'Trial', 'CumulativeMeanRT')

print(results)

Second Usage Example

library('cumplyr')

data <- data.frame(Time = 1:5, Value = seq(1, 9, by = 2))

iddply(data,
       equality.variables = c('Time'),
       lower.bound.variables = c(),
       upper.bound.variables = c(),
       norm.ball.variables = list(),
       func = function (df) {with(df, mean(Value))})

iddply(data,
       equality.variables = c(),
       lower.bound.variables = c('Time'),
       upper.bound.variables = c(),
       norm.ball.variables = list(),
       func = function (df) {with(df, mean(Value))})

iddply(data,
       equality.variables = c(),
       lower.bound.variables = c(),
       upper.bound.variables = c('Time'),
       norm.ball.variables = list(),
       func = function (df) {with(df, mean(Value))})

iddply(data,
       equality.variables = c(),
       lower.bound.variables = c(),
       upper.bound.variables = c(),
       norm.ball.variables = list('Time' = 1),
       func = function (df) {with(df, mean(Value))})

iddply(data,
       equality.variables = c(),
       lower.bound.variables = c(),
       upper.bound.variables = c(),
       norm.ball.variables = list('Time' = 2),
       func = function (df) {with(df, mean(Value))})

iddply(data,
       equality.variables = c(),
       lower.bound.variables = c(),
       upper.bound.variables = c(),
       norm.ball.variables = list('Time' = 5),
       func = function (df) {with(df, mean(Value))})
Something went wrong with that request. Please try again.