Description Usage Arguments Details Value Note Author(s) See Also Examples
A function pool.fun
is applied to all the elements of a vector val
that appear within the groups formed by identical rows of a matrix X
.
1 |
X |
the |
val |
a real vector of length |
pool.fun |
a string denoting the function to be applied to the subgroups of elements of |
echo |
Print the call of the function? |
This function is useful for plotting (and understanding) of designs of experiments with more factors than the dimension of the plot.
A list with components:
call |
the call of the function |
X.unique |
the matrix of unique rows of |
val.pooled |
the vector of the length |
The function performs a non-trivial operation only if some of the rows of X
are identical.
Radoslav Harman, Lenka Filova
1 2 3 4 5 6 7 8 9 | v1 <- c(1, 2, 3); v2 <- c(2, 4, 6); v3 <- c(2, 5, 3)
X <- rbind(v1, v1, v1, v1, v2, v3, v2, v3, v3)
val <- c(1, 2, 7, 9, 5, 8, 4, 3, 6)
od_pool(X, val, "sum")
# The result $val.pooled is a vector with components:
# 19 (=1+2+7+9) because the first 4 rows of X are identical
# 9 (=5+4) because the 5th and the 7th rows of X are identical
# 17 (=8+3+6) because the 6th, the 8th and the 9th rows of X are identical
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.