Skip to content
Prev 68487 / 398506 Next

Garbled plot label

On Mon, 25 Apr 2005, Henric Nilsson wrote:

            
To remove the problem in the plot, do:

plot(fit, sub.caption="")

As it is, sub.caption = deparse(x$call) by default, and
[1] "lm(formula = long.var.name.1 ~ long.var.name.2 + long.var.name.3 + "
[2] "    long.var.name.4)"

so this is two lines on top of each other. Unrolling:

plot(fit, sub.caption=gsub("[ ]+", " ", paste(deparse(fit$call), collapse="")))

still works, but is becoming very long. Would a better default perhaps be 
the name of the first argument?

Roger