Learn R Programming

pipeliner (version 0.1.1)

check_predict_method_throw_error: 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

Run this code
## 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)

Run the code above in your browser using DataLab