This function returns a string containing the call to the explained function to be used in an xplain wrapper function.

xplain.getcall(fun)

Arguments

fun

Name of the explained function as string

Details

xplain.getcall() can be called from an xplain wrapper function. It returns a string containing the call to the explained function with all arguments provided to the wrapper function. With xplain.getcall() it is very easy to write xplain wrapper functions.

Wrapper functions are an elegant way to provide access to xplain interpretation/explanation information. The wrapper function takes the sames arguments as the explained function and then calls xplain(). xplain.getcall() identifies the arguments provided to the wrapper function and returns the complete call of the explained function as a string which can then be handed over to xplain() as argument call.

The Examples section illustrates how to build a wrapper function using xplain.getcall().

Value

The full call of the explained function as a string, including the arguments provided by the user to the wrapper function.

See also

More material on the internet

Web tutorial on how to work with xplain: http://www.zuckarelli.de/xplain/index.html
xplain cheat sheet: http://www.zuckarelli.de/xplain/xplain_cheatsheet.pdf

Examples

library(car)
#> Lade nötiges Paket: carData
# Example of a wrapper function for lm() lm.xplain <- function(formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, ...) { call<-xplain.getcall("lm") xplain(call, xml="http://www.zuckarelli.de/xplain/example_lm.xml") } lm.xplain(education ~ young + income + urban, data=Anscombe)
#> Error in get(calling.fun): Objekt 'lm.xplain' nicht gefunden