Skip to content
Prev 27094 / 63458 Next

substitute() bug? (PR#10525)

rossibarra at gmail.com wrote:
I'm not sure this is a bug, but if it is, it's in 
graphics:::plot.formula, not in substitute.  The problem is that 
substitute returns an unevaluated call, and plot.formula tries to 
evaluate it.  You can avoid the bug by wrapping the substitute call in 
as.expression.

The docs for plotmath say that it requires an expression, but "in most 
cases" language objects will be coerced to one:  it appears this is one 
of the cases where that is not true.

Duncan Murdoch