This is a simple function to apply a summarization function to a matrix or data frame.

1 |

`data` |
A matrix or data frame to be summarized. |

`fun` |
Function to be used in the summarization. It can be any function that, taking as first argument a numeric vector, otuputs a numeric value. Typical examples are |

`group.by` |
A vector of either column names or column indices according to which the data will be grouped to be summarized. |

`ignore` |
A vector of either column names or column indices of the columns that have to be removed from the output. |

`...` |
Additional parameters to the summarization function ( |

A data frame where, for each combination of the values in the columns indicated by `group.by`

, each column (except those in `ignore`

) contains the summarization of the values in the original matrix that have that combination of values.
#' @seealso `filterData`

, `writeTabular`

and the vignette ```
vignette(topic="Data_loading_and_manipulation",
package="scmamp")
```

1 2 3 4 5 6 7 | ```
data(data_blum_2015)
# Group by size and radius. Get the mean and variance of only the last two
# columns.
summarizeData (data.blum.2015, group.by=c("Radius","Size"), ignore=3:8,
fun=mean, na.rm=TRUE)
summarizeData (data.blum.2015, group.by=c("Radius","Size"), ignore=3:8,
fun=sd, na.rm=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.