CatchError: CatchError

View source: R/NPSimulation.R

CatchErrorR Documentation

CatchError

Description

This is a helper function to stop simulations failing if the metafor function rma fails for example cannot converge properly for a specific dataset.

Usage

CatchError(expr)

Arguments

expr

The expression that is being monitored

Value

A message confirming whether the expression has performed successfully

Author(s)

Barbara Kitchenham and Lech Madeyski

Examples

ES=c(0.2,0.3)
ESvar=c(0.04,0.03)
outcome=reproducer:::CatchError(metafor::rma(ES,ESvar,method='Meth'))
outcome
# [1] 'Failure'

reproducer documentation built on Oct. 18, 2023, 5:10 p.m.