Bug #2044
closedR actor for means and error by group
0%
Description
This bug is to create an actor that wraps an R script (using the generic R actor
described in bug #1342) for calculating the mean, standard deviation, and
standard error of a numeric variable that is passed into the script. Optionally
the stats should be calculated using a grouping variable (by group), with one
mean/std/se for each group.
There are two inputs:
1) dataValue (type double)
2) group (type string)
The actor will accululate all data passed in as a series of {dataValue, group}
tuples and pass this along to R to calculate the mean, stdev, and stderr by
group. If group is not present then the tuples will be {dataValue}. When the R
script is finished, a matrix of {group, mean, stdev, stderr} will be passed back
to the R actor and then emitted on the output port. So for N tokens that come
in on the input port the actor will output on 1 token on the output port after
all input data has been received (this is a grouping operation).
Related issues