ctCollapse | R Documentation |
ctCollapse Easily collapse an array margin using a specified function.
ctCollapse(inarray, collapsemargin, collapsefunc, plyr = TRUE, ...)
inarray |
Input array of more than one dimension. |
collapsemargin |
Integers denoting which margins to collapse. |
collapsefunc |
function to use over the collapsing margin. |
plyr |
Whether to use plyr. |
... |
additional parameters to pass to collapsefunc. |
testarray <- array(rnorm(900,2,1),dim=c(100,3,3))
ctCollapse(testarray,1,mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.