Skip to content

Commit

Permalink
no colour arg if all values are NA (#404)
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph Larmarange <joseph@larmarange.net>
  • Loading branch information
larmarange committed Mar 7, 2021
1 parent 4edfeed commit b098ce9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ggcoef_model.R
Expand Up @@ -217,7 +217,7 @@ ggcoef_model <- function (
if (!"y" %in% names(args) && !"facet_row" %in% names(args))
args$y <- "label_light"

if (!"colour" %in% names(args)) {
if (!"colour" %in% names(args) & !all(is.na(data$var_label))) {
args$colour <- "var_label"
if (!"colour_guide" %in% names(args)) {
args$colour_guide <- FALSE
Expand Down Expand Up @@ -339,7 +339,7 @@ ggcoef_compare <- function (
if (!"facet_col" %in% names(args)) {
args$facet_col <- "model"
}
if (!"colour" %in% names(args)) {
if (!"colour" %in% names(args) & !all(is.na(data$var_label))) {
args$colour <- "var_label"
if (!"colour_guide" %in% names(args)) {
args$colour_guide <- FALSE
Expand Down Expand Up @@ -443,7 +443,7 @@ ggcoef_multinom <- function (
if (!"facet_col" %in% names(args)) {
args$facet_col <- "y.level"
}
if (!"colour" %in% names(args)) {
if (!"colour" %in% names(args) & !all(is.na(data$var_label))) {
args$colour <- "var_label"
if (!"colour_guide" %in% names(args)) {
args$colour_guide <- FALSE
Expand Down

0 comments on commit b098ce9

Please sign in to comment.