lapply_tryCatch: lapply with tryCatch routine

View source: R/utils.R

lapply_tryCatchR Documentation

lapply with tryCatch routine

Description

Used to run function iteratively over list, while using tryCatch to catch warnings and errors to finally present a summary of issues rather than error on each and every one. Used in iterativeLRT and iterativeModel.

Usage

lapply_tryCatch(X, FUN, err_res, ...)

Arguments

X

a vector (atomic or list) or an expression object. Other objects (including classed objects) will be coerced by base::as.list.

FUN

the function to be applied to each element of X: see ‘Details’. In the case of functions like +, %*%, the function name must be backquoted or quoted.

err_res

Function creating a result that should be output in case of error.

...

optional arguments to FUN.

Value

List of elements as returned by FUN.


Genentech/MiDAS documentation built on Feb. 5, 2024, 11:52 a.m.