Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tricolore)
  > 
  > test_check('tricolore')
  ── 1. Error: NA, Inf, NaNs in input return NA in output (@test-global.R#82)  ───
  "plot.tag" is not a valid theme element name.
  1: Tricolore(P, "a", "b", "c") at testthat/test-global.R:82
  2: ColorKey(breaks, hue * 360, chroma * 200, lightness * 100, contrast, center, spread)
  3: `+.gg`(ggtern(legend_surface, aes_string(x = "p1", y = "p2", z = "p3")) + geom_polygon(aes_string(group = "id", 
         fill = "rgb", color = "rgb"), lwd = 1) + geom_mask() + scale_color_identity(guide = FALSE) + 
         scale_fill_identity(guide = FALSE) + theme_classic(), theme(tern.axis.title.L = element_text(hjust = 0.2, 
         vjust = 1, angle = -60), tern.axis.title.R = element_text(hjust = 0.8, vjust = 0.6, 
         angle = 60)))
  4: add_ggplot(e1, e2, e2name)
  5: update_theme(p$theme, object)
  6: do.call(theme, c(oldtheme, complete = isTRUE(attr(oldtheme, "complete")), validate = old.validate & 
         new.validate))
  7: (function (..., complete = FALSE, validate = TRUE) 
     {
         elements <- list(...)
         if (!is.null(elements$axis.ticks.margin)) {
             warning("`axis.ticks.margin` is deprecated. Please set `margin` property ", 
                 " of `axis.text` instead", call. = FALSE)
             elements$axis.ticks.margin <- NULL
         }
         if (validate) {
             mapply(validate_element, elements, names(elements))
         }
         structure(elements, class = c("theme", "gg"), complete = complete, validate = validate)
     })(line = structure(list(colour = "black", size = 0.545454545454545, linetype = 1, 
         lineend = "butt", arrow = FALSE, inherit.blank = TRUE), class = c("element_line", 
     "element")), rect = structure(list(fill = "white", colour = "black", size = 0.545454545454545, 
         linetype = 1, inherit.blank = TRUE), class = c("element_rect", "element")), text = structure(list(
         family = "", face = "plain", colour = "black", size = 12, hjust = 0.5, vjust = 0.5, 
         angle = 0, lineheight = 0.9, margin = structure(c(0, 0, 0, 0), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), debug = FALSE, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.title.x = structure(list(family = NULL, face = NULL, colour = NULL, 
         size = NULL, hjust = NULL, vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(3, 
         0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
         inherit.blank = TRUE), class = c("element_text", "element")), axis.title.x.top = structure(list(
         family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 0, 
         angle = NULL, lineheight = NULL, margin = structure(c(0, 0, 3, 0), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.title.y = structure(list(family = NULL, face = NULL, colour = NULL, 
         size = NULL, hjust = NULL, vjust = 1, angle = 90, lineheight = NULL, margin = structure(c(0, 
         3, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
         inherit.blank = TRUE), class = c("element_text", "element")), axis.title.y.right = structure(list(
         family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 0, 
         angle = -90, lineheight = NULL, margin = structure(c(0, 0, 0, 3), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.text = structure(list(family = NULL, face = NULL, colour = "grey30", 
         size = structure(0.8, class = "rel"), hjust = NULL, vjust = NULL, angle = NULL, 
         lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.text.x = structure(list(family = NULL, face = NULL, colour = NULL, 
         size = NULL, hjust = NULL, vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.4, 
         0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
         inherit.blank = TRUE), class = c("element_text", "element")), axis.text.x.top = structure(list(
         family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 0, 
         angle = NULL, lineheight = NULL, margin = structure(c(0, 0, 2.4, 0), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.text.y = structure(list(family = NULL, face = NULL, colour = NULL, 
         size = NULL, hjust = 1, vjust = NULL, angle = NULL, lineheight = NULL, margin = structure(c(0, 
         2.4, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
         inherit.blank = TRUE), class = c("element_text", "element")), axis.text.y.right = structure(list(
         family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = NULL, 
         angle = NULL, lineheight = NULL, margin = structure(c(0, 0, 0, 2.4), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, inherit.blank = TRUE), class = c("element_text", 
     "element")), axis.ticks = structure(list(colour = "grey20", size = NULL, linetype = NULL, 
         lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line", 
     "element")), axis.ticks.length = structure(3, class = "unit", valid.unit = 8L, unit = "pt"), 
         axis.line = structure(list(colour = "black", size = structure(1, class = "rel"), 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line", 
         "element")), axis.line.x = NULL, axis.line.y = NULL, legend.background = structure(list(
             fill = NULL, colour = NA, size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect", 
         "element")), legend.margin = structure(c(6, 6, 6, 6), class = c("margin", "unit"
         ), valid.unit = 8L, unit = "pt"), legend.spacing = structure(12, class = "unit", valid.unit = 8L, unit = "pt"), 
         legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = structure(list(), class = c("element_blank", 
         "element")), legend.key.size = structure(1.2, class = "unit", valid.unit = 3L, unit = "lines"), 
         legend.key.height = NULL, legend.key.width = NULL, legend.text = structure(list(
             family = NULL, face = NULL, colour = NULL, size = structure(0.8, class = "rel"), 
             hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, margin = NULL, 
             debug = NULL, inherit.blank = TRUE), class = c("element_text", "element")), 
         legend.text.align = NULL, legend.title = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text", 
         "element")), legend.title.align = NULL, legend.position = "right", legend.direction = NULL, 
         legend.justification = "center", legend.box = NULL, legend.box.margin = structure(c(0, 
         0, 0, 0), class = c("margin", "unit"), valid.unit = 1L, unit = "cm"), legend.box.background = structure(list(), class = c("element_blank", 
         "element")), legend.box.spacing = structure(12, class = "unit", valid.unit = 8L, unit = "pt"), 
         panel.background = structure(list(fill = "white", colour = NA, size = NULL, linetype = NULL, 
             inherit.blank = TRUE), class = c("element_rect", "element")), panel.border = structure(list(), class = c("element_blank", 
         "element")), panel.spacing = structure(6, class = "unit", valid.unit = 8L, unit = "pt"), 
         panel.spacing.x = NULL, panel.spacing.y = NULL, panel.grid = structure(list(colour = "grey92", 
             size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line", 
         "element")), panel.grid.minor = structure(list(), class = c("element_blank", 
         "element")), panel.ontop = FALSE, plot.background = structure(list(fill = NULL, 
             colour = "white", size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect", 
         "element")), plot.title = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = structure(1.2, class = "rel"), hjust = 0, vjust = 1, angle = NULL, 
             lineheight = NULL, margin = structure(c(0, 0, 6, 0), class = c("margin", 
             "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, inherit.blank = TRUE), class = c("element_text", 
         "element")), plot.subtitle = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = 0, vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(0, 
             0, 6, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
             inherit.blank = TRUE), class = c("element_text", "element")), plot.caption = structure(list(
             family = NULL, face = NULL, colour = NULL, size = structure(0.8, class = "rel"), 
             hjust = 1, vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(6, 
             0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), debug = NULL, 
             inherit.blank = TRUE), class = c("element_text", "element")), plot.tag = structure(list(
             family = NULL, face = NULL, colour = NULL, size = structure(1.2, class = "rel"), 
             hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL, margin = NULL, 
             debug = NULL, inherit.blank = TRUE), class = c("element_text", "element")), 
         plot.tag.position = "topleft", plot.margin = structure(c(6, 6, 6, 6), class = c("margin", 
         "unit"), valid.unit = 8L, unit = "pt"), strip.background = structure(list(fill = "white", 
             colour = "black", size = structure(2, class = "rel"), linetype = NULL, inherit.blank = TRUE), class = c("element_rect", 
         "element")), strip.placement = "inside", strip.text = structure(list(family = NULL, 
             face = NULL, colour = "grey10", size = structure(0.8, class = "rel"), hjust = NULL, 
             vjust = NULL, angle = NULL, lineheight = NULL, margin = structure(c(4.8, 
             4.8, 4.8, 4.8), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"), 
             debug = NULL, inherit.blank = TRUE), class = c("element_text", "element")), 
         strip.text.x = NULL, strip.text.y = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text", 
         "element")), strip.switch.pad.grid = structure(3, class = "unit", valid.unit = 8L, unit = "pt"), 
         strip.switch.pad.wrap = structure(3, class = "unit", valid.unit = 8L, unit = "pt"), 
         tern.panel.background = structure(list(fill = NULL, colour = NULL, size = NULL, 
             linetype = NULL, inherit.blank = FALSE), class = c("element_rect", "element"
         )), tern.plot.background = structure(list(fill = NULL, colour = NA, size = NA, 
             linetype = NULL, inherit.blank = FALSE), class = c("element_rect", "element"
         )), tern.plot.latex = FALSE, tern.axis.hshift = 0, tern.axis.vshift = 0, tern.axis.clockwise = FALSE, 
         tern.axis.line = structure(list(), class = c("element_blank", "element")), tern.axis.line.T = structure(list(
             colour = NULL, size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, 
             inherit.blank = FALSE), class = c("element_line", "element")), tern.axis.line.L = structure(list(
             colour = NULL, size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, 
             inherit.blank = FALSE), class = c("element_line", "element")), tern.axis.line.R = structure(list(
             colour = NULL, size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, 
             inherit.blank = FALSE), class = c("element_line", "element")), tern.axis.line.ontop = NULL, 
         tern.axis.title = structure(list(family = NULL, face = NULL, colour = NULL, size = NULL, 
             hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, margin = NULL, 
             debug = NULL, inherit.blank = FALSE), class = c("element_text", "element"
         )), tern.axis.title.T = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.title.L = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.title.R = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.title.show = TRUE, tern.axis.text = structure(list(family = NULL, 
             face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, 
             lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.text.T = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.text.L = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.text.R = structure(list(family = NULL, face = NULL, colour = NULL, 
             size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.text.show = TRUE, tern.axis.arrow = structure(list(colour = NULL, 
             size = NULL, linetype = NULL, lineend = structure(list(angle = 30, length = structure(2.5, class = "unit", valid.unit = 7L, unit = "mm"), 
                 ends = 2L, type = 1L), class = "arrow"), arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.arrow.T = structure(list(colour = NULL, size = NULL, linetype = NULL, 
             lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.arrow.L = structure(list(colour = NULL, size = NULL, linetype = NULL, 
             lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.arrow.R = structure(list(colour = NULL, size = NULL, linetype = NULL, 
             lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.arrow.text = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.arrow.text.T = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.arrow.text.L = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.arrow.text.R = structure(list(family = NULL, face = NULL, 
             colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, 
             margin = NULL, debug = NULL, inherit.blank = FALSE), class = c("element_text", 
         "element")), tern.axis.arrow.sep = 0.1, tern.axis.arrow.show = FALSE, tern.axis.arrow.start = 0.3, 
         tern.axis.arrow.finish = 0.7, tern.axis.ticks = structure(list(colour = NULL, 
             size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.major = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.major.T = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.major.L = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.major.R = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.length.major = structure(list(fname = "*", arg1 = 1, 
             arg2 = structure(3, class = "unit", valid.unit = 8L, unit = "pt")), class = c("unit.arithmetic", 
         "unit")), tern.axis.ticks.length.minor = structure(list(fname = "*", arg1 = 0.5, 
             arg2 = structure(3, class = "unit", valid.unit = 8L, unit = "pt")), class = c("unit.arithmetic", 
         "unit")), tern.axis.ticks.outside = TRUE, tern.axis.ticks.primary.show = TRUE, 
         tern.axis.ticks.secondary.show = FALSE, tern.axis.ticks.minor = structure(list(), class = c("element_blank", 
         "element")), tern.axis.ticks.minor.T = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.minor.L = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.axis.ticks.minor.R = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.panel.grid.major = structure(list(colour = NULL, size = NULL, 
             linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = FALSE), class = c("element_line", 
         "element")), tern.panel.grid.major.T = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.major.L = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.major.R = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.major.show = TRUE, tern.panel.grid.minor = structure(list(
             colour = NULL, size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, 
             inherit.blank = FALSE), class = c("element_line", "element")), tern.panel.grid.minor.T = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.minor.L = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.minor.R = structure(list(), class = c("element_blank", 
         "element")), tern.panel.grid.minor.show = TRUE, tern.panel.grid.ontop = FALSE, 
         tern.panel.mask.show = TRUE, tern.panel.expand = 0.2, tern.panel.rotate = 0, 
         panel.grid.major = structure(list(), class = c("element_blank", "element")), 
         complete = TRUE, validate = TRUE)
  8: mapply(validate_element, elements, names(elements))
  9: (function (el, elname) 
     {
         eldef <- ggint$.element_tree[[elname]]
         if (is.null(eldef)) {
             stop("\"", elname, "\" is not a valid theme element name.")
         }
         if (is.null(el)) 
             return()
         if (eldef$class == "character") {
             if (!is.character(el) && !is.numeric(el)) 
                 stop("Element ", elname, " must be a string or numeric vector.")
         }
         else if (eldef$class == "margin") {
             if (!is.unit(el) && length(el) == 4) 
                 stop("Element ", elname, " must be a unit vector of length 4.")
         }
         else if (!inherits(el, eldef$class) && !inherits(el, "element_blank")) {
             stop("Element ", elname, " must be a ", eldef$class, " object.")
         }
         invisible()
     })(dots[[1L]][[50L]], dots[[2L]][[50L]])
  10: stop("\"", elname, "\" is not a valid theme element name.")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 33 SKIPPED: 0 FAILED: 1
  1. Error: NA, Inf, NaNs in input return NA in output (@test-global.R#82) 
  
  Error: testthat unit tests failed
  Execution halted