filter_ref computes the reference distance filter.

filter_ref(dist, groups_ind, ref, ...)

Arguments

dist

The distance matrix.

groups_ind

A vector of group names each of the samples belongs to.

ref

A string object specifying the name of the reference group.

...

Additional arguments.

Value

A matrix object of filter values.

Details

Reference distance filter function is defined as \(f(x_i;y,g) = 1-\textrm{median}_{y_j=g} d(x_i,x_j)\), where

Examples

tp_data <- chicken_generator(1)
tp_dist <- dist(tp_data[,-1])
filter_ref(dist=tp_dist, groups_ind=tp_data$Group, ref = "Shank")