try_pipeline_func_call {pipeliner}R Documentation

Custom tryCatch configuration for pipeline segment segment functions

Description

Custom tryCatch configuration for pipeline segment segment functions

Usage

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

## 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)

[Package pipeliner version 0.1.1 Index]