Description Usage Arguments Examples
Helper function that checks if the object returned from a ml_pipeline_builder
method is
data.frame (if it isn't NULL), and if it isn't, throws an error that is customised with the
returning name.
1 | check_data_frame_throw_error(func_return_object, func_name)
|
func_return_object |
The object returned from a |
func_name |
The name of the function that returned the object. |
1 2 3 4 5 6 7 8 | ## Not run:
transform_method <- function(df) df
data <- data.frame(y = c(1, 2), x = c(0.1, 0.2))
data_transformed <- transform_method(data)
check_data_frame_throw_error(data_transformed, "transform_method")
# NULL
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.