color_subcluster: Expand color vector for subclusters

View source: R/color_functions.R

color_subclusterR Documentation

Expand color vector for subclusters

Description

Make a vector of colors for a vector of subclusters grouped by their assignment to a cluster

Usage

color_subcluster(
  subcluster,
  cluster,
  cluster_colors = c(),
  order = TRUE,
  brightness_change = NA,
  max_change = 1
)

Arguments

subcluster

vector of subcluster assignments (can be duplicated across cell assignments)

cluster

vector of cluster assignment for each subcluster (vector of same length as subcluster)

cluster_colors

(named) vector of colors for each cluster

order

should colors be ordered by subcluster size? Set to FALSE to use factor levels

brightness_change

how big a change in color brightness should be applied at each step (between 0 and 1)

Value

vector of colors


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.