mirror of
https://github.com/dchakro/shared_Rscripts.git
synced 2026-05-17 09:12:16 -07:00
bugfix: Return color for just 1 category.
This commit is contained in:
parent
89a26f4af9
commit
fe9963de5b
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ returnPalette <-
|
||||||
if (class(ColorVariable) == "factor") {
|
if (class(ColorVariable) == "factor") {
|
||||||
colorsNeeded <- length(levels(ColorVariable))
|
colorsNeeded <- length(levels(ColorVariable))
|
||||||
}
|
}
|
||||||
if (colorsNeeded < 1) {
|
if (colorsNeeded <= 1) {
|
||||||
myPalette <- c("#DD0000")
|
myPalette <- c("#DD0000")
|
||||||
warning("Nothing to return color for.")
|
warning("Nothing to return color for.")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue