fac2col {sccore} | R Documentation |
Utility function to translate a factor into colors
Description
Utility function to translate a factor into colors
Usage
fac2col(
x,
s = 1,
v = 1,
shuffle = FALSE,
min.group.size = 1,
return.details = FALSE,
unclassified.cell.color = "gray50",
level.colors = NULL
)
Arguments
x |
input factor |
s |
numeric The "saturation" to be used to complete the HSV color descriptions (default=1) See ?rainbow in Palettes, grDevices |
v |
numeric The "value" to be used to complete the HSV color descriptions (default=1) See ?rainbow in Palettes, grDevices |
shuffle |
boolean If TRUE, shuffles columns with shuffle(columns) (default=FALSE) |
min.group.size |
integer Exclude groups of size less than the min.group.size (default=1) |
return.details |
boolean If TRUE, returns a list list(colors=y, palette=col). Otherwise, just returns the factor (default=FALSE) |
unclassified.cell.color |
Color for unclassified cells (default='gray50') |
level.colors |
(default=NULL) |
Value
vector or list of colors
Examples
genes = factor(c("BRAF", "NPC1", "PAX3", "BRCA2", "FMR1"))
fac2col(genes)
[Package sccore version 1.0.5 Index]