annotate_archetypes.Rd
annotate_archetypes()
adds custom labels to archetype indices: paste0(label, "_", index)
annotate_archetypes(arc, ...)
... | named arguments specifying label for indicex, e.g. |
---|---|
arc_data | objects of class "pch_fit", "b_pch_fit", "k_pch_fit" storing the position of archetypes, and other data from |
annotate_archetypes()
archetypal analysis result object, the same as input but with named archetypes
# 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)