Is there a way to determine if a function generates a figure in R?
For example, if we have functions f and g
f = function(x,y){plot(x,y)}
g = function(x,y){mean(x*y)}
I would like able to run
createFigure(f(x,y))#Returns TRUE
createFigure(g(x,y))#Returns FALSE
Thanks