Description Usage Arguments Value Examples
For a given [0,1] cutoff value, this function calculates the midpoint between within group clustering and out-of-group exclusion. It's primary purpose is internal use for other functions.
1  | 
dist_mat | 
 A [0, 1] bounded square distance matrix with column names matching groups.  | 
cut_off | 
 A [0, 1] bounded scalar that specifies cutoff. Defaults to 0.  | 
group | 
 A character string specifying group of interest. Default if first group in matrix.  | 
returns [0, 1] bounded midpoint
1 2 3 4 5 6 7 8 9 10 11  | set.seed(123)
groups <- 5
n_groups <- 5
n_obs <- groups * n_groups
group_names <- rep(letters[1:groups], each = 5)
example_dist <- sample(1:100, size = 25) %>%
  dist %>%
as.matrix
example_dist <- example_dist/max(example_dist)
colnames(example_dist) <- group_names
mid_score(example_dist, cut_off = 0.2, group_names[1])
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.