Description Usage Arguments Value Examples
Custom tryCatch configuration for pipeline segment segment functions
1 | try_pipeline_func_call(.f, arg, func_name)
|
.f |
Pipleine segment function |
arg |
Arguement of |
func_name |
(Character string). |
Returns the same object as .f does (a data.frame or model object), unless an error is thrown.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.