check_data_frame_throw_error {pipeliner} | R Documentation |
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.
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. |
## 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)