fail_safe_formula {ggpmisc} | R Documentation |
Safely extract the formula from an object
Description
Safely extract the formula from an object
Usage
fail_safe_formula(fm, method.args = list(), verbose = TRUE)
Arguments
fm |
Fitted model object or a call object. |
method.args |
List of arguments to check for the formula. |
verbose |
logical If |
Details
Method formula
is not implemented for all fitted
model objects, while the default method triggers an error and stops
exectution. Function fail_safe_formula()
wraps the call to
formula()
and handles the error conditions by attempting to
extract the formula from a list of arguments. If this fails, it returns
NA
, with a message.
Value
A named list with objects of class formula or NA as member(s).
[Package ggpmisc version 0.6.2 Index]