Description Usage Arguments Value Examples
ddply with inequality constraints
1 2 3 4 5 6 |
data |
Data to process |
equality.variables |
Character vector of variables used to split data on equality |
lower.bound.variables |
Character vector of variables used to split data on lower bound inequalities |
upper.bound.variables |
Character vector of variables used to split data on upper bound inequalities |
norm.ball.variables |
Character vector of variables used to split data on norm ball inequalities |
func |
Function to call on each split-out subset of the data |
Data frame with results combined across splits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 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))})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.