annotate_archetypes() adds custom labels to archetype indices: paste0(label, "_", index)

annotate_archetypes(arc, ...)

Arguments

...

named arguments specifying label for indicex, e.g. Epithelial = c(1, 5, 9)

arc_data

objects of class "pch_fit", "b_pch_fit", "k_pch_fit" storing the position of archetypes, and other data from fit_pch() run. arc_data$XC is matrix of dim(dimensions, archetypes) or list where each element is XC matrix from an independent run of the archetypal analysis.

Value

annotate_archetypes() archetypal analysis result object, the same as input but with named archetypes

See also

Examples

# Random data that fits into the triangle set.seed(4355) archetypes = generate_arc(arc_coord = list(c(5, 0), c(-10, 15), c(-30, -20)), mean = 0, sd = 1) data = generate_data(archetypes$XC, N_examples = 1e4, jiiter = 0.04, size = 0.9) # Find 3 archetypes in this data arc = fit_pch(data, noc=as.integer(3), delta=0) # Annotate arc = annotate_archetypes(arc, top = 2, bottom = c(1, 3)) # Plot plot_arc(arc, data, which_dimensions = 1:2, arc_names_num = F)