tests/testthat/test_misc_reporter.r

### library(metafor); library(testthat); Sys.setenv(NOT_CRAN="true")

context("Checking misc: reporter() function")

source("settings.r")

test_that("reporter() works correctly for 'rma.uni' objects.", {

   dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
   expect_error(res <- rma(yi, vi, data=dat), NA) # to avoid this being an empty test

   skip_on_cran()

   reporter(res, open=FALSE)

})

rm(list=ls())

Try the metafor package in your browser

Any scripts or data that you put into this service are public.

metafor documentation built on Sept. 28, 2023, 1:07 a.m.