Description Usage Arguments Value Author(s) See Also Examples
integrate over all others but 2 columns
1 2 |
x |
numeric matrix |
vars |
index (integer or string): column to define integration boxes |
intCol |
index (integer or string): column to average |
n |
numeric vector: number of groups per variable |
dimnames |
dimension names of the result array |
fAgg |
function applied over the subsets of x[,intCol] |
... |
further arguments to fAgg |
numeric matrix with each item representing application of fAgg to x[,intCol] and dimnames equal to means of the classes
Thomas Wutzler
1 2 3 4 5 6 7 | data(twdemcEx1)
sample <- stackChains(twdemcEx1)
#res <- marginals2d(sample,vars=c("kY","kO"),n=10)
res <- marginals2d(sample,vars=c("a","b"),n=10)
if( require(lattice) && require(reshape) ){
levelplot( value~a*b, data=melt(res), col.regions=rev(heat.colors(100)), xlab=names(dimnames(res))[1], ylab=names(dimnames(res))[2] )
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.