Running ‘forestplot2_vtests.R’
  Running ‘test_visual_w_cochrane_mdata.R’
  Running ‘testthat.R’
  Running ‘vtest_from_vignette.R’
Running the tests in ‘tests/forestplot2_vtests.R’ failed.
Complete output:
  > library(forestplot)
  Loading required package: grid
  Loading required package: magrittr
  Loading required package: checkmate
  > test_data <- data.frame(coef1=c(1, 1.59, 1.3, 1.24),
  +                         coef2=c(1, 1.7, 1.4, 1.04))
  > 
  > test_data$low1 <- test_data$coef1 - 1.96*c(0, .2, .1, .15)
  > test_data$high1 <- test_data$coef1 + 1.96*c(0, .2, .1, .15)
  > 
  > test_data$low2 <- test_data$coef2 - 1.96*c(0, .1, .15, .2)
  > test_data$high2 <- test_data$coef2 + 1.96*c(0, .1, .15, .2)
  > 
  > col_no <- grep("coef", colnames(test_data))
  > row_names <- list(
  +   list("Category 1", "Category 2", "Category 3", expression(Category >= 4)),
  +   list("ref",
  +        substitute(expression(bar(x) == val),
  +                   list(val = round(rowMeans(test_data[2, col_no]), 2))),
  +        substitute(expression(bar(x) == val),
  +                   list(val = round(rowMeans(test_data[3, col_no]), 2))),
  +        substitute(expression(bar(x) == val),
  +                   list(val = round(rowMeans(test_data[4, col_no]), 2))))
  + )
  > 
  > coef <- with(test_data, cbind(coef1, coef2))
  > low <- with(test_data, cbind(low1, low2))
  > high <- with(test_data, cbind(high1, high2))
  > 
  > # Change all to diamonds
  > forestplot(row_names, coef, low, high,
  +            fn.ci_norm=fpDrawDiamondCI,
  +            title="Cool study",
  +            zero = 1, boxsize=0.25,
  +            col=fpColors(box=c("royalblue", "gold"),
  +                         line=c("darkblue", "orange"),
  +                         summary=c("darkblue", "red")),
  +            xlab="The estimates",
  +            legend_args = fpLegend(title = "Group",
  +                                   pos = list("topright"),
  +                                   r = unit(.1, "snpc"),
  +                                   gp = gpar(col="#CCCCCC", lwd=1.5)),
  +            legend=c("Treatment", "Placebo"))
  
   *** caught segfault ***
  address 6e903661, cause 'memory not mapped'
  
  Traceback:
   1: qassert(classes, "S+")
   2: checkClass(x, classes, ordered, null.ok)
   3: assert_class(txt_gp, "fpTxtGp")
   4: forestplot.default(row_names, coef, low, high, fn.ci_norm = fpDrawDiamondCI,     title = "Cool study", zero = 1, boxsize = 0.25, col = fpColors(box = c("royalblue",         "gold"), line = c("darkblue", "orange"), summary = c("darkblue",         "red")), xlab = "The estimates", legend_args = fpLegend(title = "Group",         pos = list("topright"), r = unit(0.1, "snpc"), gp = gpar(col = "#CCCCCC",             lwd = 1.5)), legend = c("Treatment", "Placebo"))
   5: forestplot(row_names, coef, low, high, fn.ci_norm = fpDrawDiamondCI,     title = "Cool study", zero = 1, boxsize = 0.25, col = fpColors(box = c("royalblue",         "gold"), line = c("darkblue", "orange"), summary = c("darkblue",         "red")), xlab = "The estimates", legend_args = fpLegend(title = "Group",         pos = list("topright"), r = unit(0.1, "snpc"), gp = gpar(col = "#CCCCCC",             lwd = 1.5)), legend = c("Treatment", "Placebo"))
  An irrecoverable exception occurred. R is aborting now ...
Running the tests in ‘tests/test_visual_w_cochrane_mdata.R’ failed.
Complete output:
  > library(forestplot)
  Loading required package: grid
  Loading required package: magrittr
  Loading required package: checkmate
  > 
  > # Cochrane data from the 'rmeta'-package
  > cochrane_from_rmeta <-
  +   structure(list(
  +     mean  = c(NA, NA, 0.578, 0.165, 0.246, 0.700, 0.348, 0.139, 1.017, NA, 0.531),
  +     lower = c(NA, NA, 0.372, 0.018, 0.072, 0.333, 0.083, 0.016, 0.365, NA, 0.386),
  +     upper = c(NA, NA, 0.898, 1.517, 0.833, 1.474, 1.455, 1.209, 2.831, NA, 0.731)),
  +     .Names = c("mean", "lower", "upper"),
  +     row.names = c(NA, -11L),
  +     class = "data.frame")
  > 
  > tabletext<-cbind(
  +   c("", "Study", "Auckland", "Block",
  +     "Doran", "Gamsu", "Morrison", "Papageorgiou",
  +     "Tauesch", NA, "Summary"),
  +   c("Deaths", "(steroid)", "36", "1",
  +     "4", "14", "3", "1",
  +     "8", NA, NA),
  +   c("Deaths", "(placebo)", "60", "5",
  +     "11", "20", "7", "7",
  +     "10", NA, NA),
  +   c("", "OR", "0.58", "0.16",
  +     "0.25", "0.70", "0.35", "0.14",
  +     "1.02", NA, "0.53"))
  > 
  > # add extra "summary" line:
  > cochrane_from_rmeta <- rbind(cochrane_from_rmeta,
  +                              cochrane_from_rmeta[nrow(cochrane_from_rmeta), ])
  > 
  > tabletext <- rbind(tabletext,
  +                    c("95% prediction interval",
  +                      rep(NA, ncol(tabletext)-1)))
  > 
  > # add second set of outcomes:
  > cochrane_from_rmeta <- cbind(cochrane_from_rmeta,
  +                              "mean2"= c(NA,NA,exp(rnorm(7)),NA,NA,NA))
  > cochrane_from_rmeta <- cbind(cochrane_from_rmeta,
  +                              "lower2"= cochrane_from_rmeta$mean2/2,
  +                              "upper2"= cochrane_from_rmeta$mean2*2)
  > 
  > 
  > fpDrawBarCI <- function (lower_limit, estimate, upper_limit, size, col, y.offset = 0.5, ...)
  + {
  +   size <- ifelse(is.unit(size), convertUnit(size, unitTo = "npc", valueOnly = TRUE), size) * 0.9
  +   grid.polygon(x = unit(c(lower_limit, upper_limit, upper_limit, lower_limit), "native"),
  +                y = unit(y.offset + 0.5*c(1, 1, -1, -1)* size, "npc"),
  +                gp = gpar(fill = col, col = col))
  + }
  > 
  > 
  > ###############################################
  > # (1)  forest plot for single set of outcomes:
  > 
  > forestplot(tabletext,
  +            fn.ci_sum = c(
  +              as.list(rep("fpDrawSummaryCI",
  +                          nrow(cochrane_from_rmeta) - 2)),
  +              fpDrawSummaryCI,
  +              fpDrawBarCI),
  +            mean=cochrane_from_rmeta$mean,
  +            lower=cochrane_from_rmeta$lower,
  +            upper=cochrane_from_rmeta$upper,
  +            new_page = TRUE,
  +            is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE, TRUE),
  +            clip=c(0.1,2.5),
  +            xlog=TRUE,
  +            col=fpColors(box="royalblue",line="darkblue", summary="royalblue"))
  
   *** caught segfault ***
  address 43fb, cause 'memory not mapped'
  
  Traceback:
   1: qassert(classes, "S+")
   2: checkClass(x, classes, ordered, null.ok)
   3: assert_class(txt_gp, "fpTxtGp")
   4: forestplot.default(tabletext, fn.ci_sum = c(as.list(rep("fpDrawSummaryCI",     nrow(cochrane_from_rmeta) - 2)), fpDrawSummaryCI, fpDrawBarCI),     mean = cochrane_from_rmeta$mean, lower = cochrane_from_rmeta$lower,     upper = cochrane_from_rmeta$upper, new_page = TRUE, is.summary = c(TRUE,         TRUE, rep(FALSE, 8), TRUE, TRUE), clip = c(0.1, 2.5),     xlog = TRUE, col = fpColors(box = "royalblue", line = "darkblue",         summary = "royalblue"))
   5: forestplot(tabletext, fn.ci_sum = c(as.list(rep("fpDrawSummaryCI",     nrow(cochrane_from_rmeta) - 2)), fpDrawSummaryCI, fpDrawBarCI),     mean = cochrane_from_rmeta$mean, lower = cochrane_from_rmeta$lower,     upper = cochrane_from_rmeta$upper, new_page = TRUE, is.summary = c(TRUE,         TRUE, rep(FALSE, 8), TRUE, TRUE), clip = c(0.1, 2.5),     xlog = TRUE, col = fpColors(box = "royalblue", line = "darkblue",         summary = "royalblue"))
  An irrecoverable exception occurred. R is aborting now ...
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library('testthat')
  > 
  > test_check('forestplot')
  Loading required package: forestplot
  Loading required package: grid
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required package: checkmate
  ── 1. Error: Check different input formats (@test-inputs.R#8)  ─────────────────
  STRING_ELT() can only be applied to a 'character vector', not a 'raw'
  1: expect_silent(abind(basic_data, basic_data + 1, along = 3) %>% forestplot(labeltext = 1:3)) at testthat/test-inputs.R:8
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: abind(basic_data, basic_data + 1, along = 3) %>% forestplot(labeltext = 1:3)
  10: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  11: eval(quote(`_fseq`(`_lhs`)), env, env)
  12: eval(quote(`_fseq`(`_lhs`)), env, env)
  13: `_fseq`(`_lhs`)
  14: freduce(value, `_function_list`)
  15: withVisible(function_list[[k]](value))
  16: function_list[[k]](value)
  17: forestplot(., labeltext = 1:3)
  18: forestplot.default(., labeltext = 1:3)
  19: assert_class(txt_gp, "fpTxtGp")
  20: checkClass(x, classes, ordered, null.ok)
  21: qassert(classes, "S+")
  
  ── 2. Error: Basic multirow identification of mean, lower, upper (@test-prFpConv
  LOGICAL() can only be applied to a 'logical', not a 'raw'
  1: expect_set_equal(out$lower, 1:2) at testthat/test-prFpConvertMultidimArray.R:18
  2: checkSetEqual(x, y, ordered, fmatch)
  3: qassert(ordered, "B1")
  
  ── 3. Error: Check identification of mean, lower, upper with NA (@test-prFpConve
  LOGICAL() can only be applied to a 'logical', not a 'raw'
  1: expect_set_equal(out$lower, c(NA, 1:2)) at testthat/test-prFpConvertMultidimArray.R:37
  2: checkSetEqual(x, y, ordered, fmatch)
  3: qassert(ordered, "B1")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 63 SKIPPED: 0 FAILED: 3
  1. Error: Check different input formats (@test-inputs.R#8) 
  2. Error: Basic multirow identification of mean, lower, upper (@test-prFpConvertMultidimArray.R#18) 
  3. Error: Check identification of mean, lower, upper with NA (@test-prFpConvertMultidimArray.R#37) 
  
  Error: testthat unit tests failed
  Execution halted
Running the tests in ‘tests/vtest_from_vignette.R’ failed.
Complete output:
  > library(forestplot)
  Loading required package: grid
  Loading required package: magrittr
  Loading required package: checkmate
  > options(forestplot_new_page = TRUE)
  > # Cochrane data from the 'rmeta'-package
  > cochrane_from_rmeta <-
  +   structure(list(
  +     mean  = c(NA, NA, 0.578, 0.165, 0.246, 0.700, 0.348, 0.139, 1.017, NA, 0.531),
  +     lower = c(NA, NA, 0.372, 0.018, 0.072, 0.333, 0.083, 0.016, 0.365, NA, 0.386),
  +     upper = c(NA, NA, 0.898, 1.517, 0.833, 1.474, 1.455, 1.209, 2.831, NA, 0.731)),
  +     .Names = c("mean", "lower", "upper"),
  +     row.names = c(NA, -11L),
  +     class = "data.frame")
  > 
  > tabletext<-cbind(
  +   c("", "Study", "Auckland", "Block",
  +     "Doran", "Gamsu", "Morrison", "Papageorgiou",
  +     "Tauesch", NA, "Summary"),
  +   c("Deaths", "(steroid)", "36", "1",
  +     "4", "14", "3", "1",
  +     "8", NA, NA),
  +   c("Deaths", "(placebo)", "60", "5",
  +     "11", "20", "7", "7",
  +     "10", NA, NA),
  +   c("", "OR", "0.58", "0.16",
  +     "0.25", "0.70", "0.35", "0.14",
  +     "1.02", NA, "0.53"))
  > 
  > # Test summary
  > forestplot(tabletext,
  +            cochrane_from_rmeta,new_page = TRUE,
  +            is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE),
  +            clip=c(0.1,2.5),
  +            xlog=TRUE,
  +            col=fpColors(box="royalblue",line="darkblue", summary="royalblue"))
  
   *** caught segfault ***
  address 8, cause 'memory not mapped'
  
  Traceback:
   1: qassert(classes, "S+")
   2: checkClass(x, classes, ordered, null.ok)
   3: assert_class(txt_gp, "fpTxtGp")
   4: forestplot.default(tabletext, cochrane_from_rmeta, new_page = TRUE,     is.summary = c(TRUE, TRUE, rep(FALSE, 8), TRUE), clip = c(0.1,         2.5), xlog = TRUE, col = fpColors(box = "royalblue",         line = "darkblue", summary = "royalblue"))
   5: forestplot(tabletext, cochrane_from_rmeta, new_page = TRUE, is.summary = c(TRUE,     TRUE, rep(FALSE, 8), TRUE), clip = c(0.1, 2.5), xlog = TRUE,     col = fpColors(box = "royalblue", line = "darkblue", summary = "royalblue"))
  An irrecoverable exception occurred. R is aborting now ...