calculates average values and distributions for each cluster and time point of a time series

1 | ```
clusterAverages(ts, cls, cls.srt, avg = "median", q = 0.9, rm.inf = TRUE)
``` |

`ts` |
a matrix of time series, with time points in columns |

`cls` |
a clustering of the time series, |

`cls.srt` |
optional sorting of the clusters |

`avg` |
a function (or the name of a function as a string)
for calculating an ‘average’ value for each cluster; default is
the |

`q` |
either numeric 0-1, the fraction of data for which high
and low data cut-offs are calculated, or a function name for
calculating variance (eg. "sd", "var"), which will be added and
subtracted from the average (argument |

`rm.inf` |
remove infinite values (e.g. from log transformations) |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.