clusterAverages: calculates cluster averages

Description Usage Arguments

View source: R/clusterTools.R

Description

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

Usage

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

Arguments

ts

a matrix of time series, with time points in columns

cls

a clustering of the time series, length(cls) must equal nrow(cls)

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 median

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 avg) for high and low data cut-offs

rm.inf

remove infinite values (e.g. from log transformations)


raim/segmenTools documentation built on Nov. 9, 2018, 5:38 p.m.