Running examples in ‘teal.reporter-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Reporter
> ### Title: 'Reporter': An 'R6' class for managing reports
> ### Aliases: Reporter
> 
> ### ** Examples
> 
> ## Don't show: 
> if (require("ggplot2")) withAutoprint({ # examplesIf
+ ## End(Don't show)
+ library(ggplot2)
+ 
+ card1 <- teal_card("## Header 2 text", "A paragraph of default text")
+ card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
+ metadata(card1, "title") <- "Card1"
+ 
+ card2 <- teal_card("Document introduction")
+ metadata(card2, "title") <- "Card2"
+ 
+ reporter <- Reporter$new()
+ reporter$append_cards(list(card1, card2))
+ ## Don't show: 
+ }) # examplesIf
Loading required package: ggplot2
> library(ggplot2)
> card1 <- teal_card("## Header 2 text", "A paragraph of default text")
> card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
`stat_bin()` using `bins = 30`. Pick better value `binwidth`.
> metadata(card1, "title") <- "Card1"
> card2 <- teal_card("Document introduction")
> metadata(card2, "title") <- "Card2"
> reporter <- Reporter$new()
> reporter$append_cards(list(card1, card2))
> ## End(Don't show)
> ## Don't show: 
> if (require("ggplot2") && require("rtables")) withAutoprint({ # examplesIf
+ ## End(Don't show)
+ library(rtables)
+ # With the card1 from above
+ lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
+ table_res2 <- build_table(lyt, airquality)
+ card2 <- teal_card(
+   "## Header 2 text",
+   "A paragraph of default text",
+   table_res2
+ )
+ metadata(card2, "title") <- "Card2"
+ 
+ reporter <- Reporter$new()
+ reporter$append_cards(list(card1, card2))
+ 
+ names(reporter$get_cards())
+ reporter$reorder_cards(c("Card2", "Card1"))
+ names(reporter$get_cards())
+ ## Don't show: 
+ }) # examplesIf
Loading required package: rtables
Loading required package: formatters

Attaching package: ‘formatters’

The following object is masked from ‘package:base’:

    %||%

Loading required package: magrittr

Attaching package: ‘rtables’

The following object is masked from ‘package:utils’:

    str

> library(rtables)
> lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
> table_res2 <- build_table(lyt, airquality)
Split var [Day] was not character or factor. Converting to factor
Error in match.arg(round_type) : 'arg' must be of length 1
Calls: withAutoprint ... <Anonymous> -> format_rcell -> format_value -> match.arg
Execution halted