check_predict_method_throw_error {pipeliner}R Documentation

Validate estimate_model method returns an object with a predict method defined

Description

Helper function that checks if the object returned from the estimate_model method has a predict method defined for it.

Usage

check_predict_method_throw_error(func_return_object)

Arguments

func_return_object

The object returned from the estimate_model method.

Examples

## Not run: 
estimation_method <- function(df) lm(eruptions ~ 0 + waiting, df)
data <- faithful
model_estimate <- estimation_method(data)
check_predict_method_throw_error(model_estimate)
# NULL

## End(Not run)

[Package pipeliner version 0.1.1 Index]