try_pipeline_func_call: Custom tryCatch configuration for pipeline segment segment...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Custom tryCatch configuration for pipeline segment segment functions

Usage

1
try_pipeline_func_call(.f, arg, func_name)

Arguments

.f

Pipleine segment function

arg

Arguement of .f

func_name

(Character string).

Value

Returns the same object as .f does (a data.frame or model object), unless an error is thrown.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data <- data.frame(x = 1:3, y = 1:3 / 10)
f <- function(df) data.frame(p = df$x ^ 2, q = df$wrong)
try_pipeline_func_call(f, data, "f")
# Error in data.frame(p = df$x^2, q = df$wrong) :
#   arguments imply differing number of rows: 3, 0
# --> called from within function: f

## End(Not run)

pipeliner documentation built on May 1, 2019, 6:49 p.m.