Indeed, the call you pass to playwith() must be a self-contained plot
function. Try one of these:
playwith( {plot(x,y); abline(lm(y~x)} )
playwith(plot(x,y, panel.last=abline(lm(y~x))))
playwith(xyplot(y ~ x, type=c("p", "r")))
On Sat, Jul 26, 2008 at 1:52 AM, Christoph Scherber
<Christoph.Scherber at agr.uni-goettingen.de>
wrote:> Dear all,
>
> Is it possible to use abline() after calling playwith(plot(...)))?
>
> x=1:10
> y=x^2
>
> playwith(plot(x,y)) # works fine
> playwith({abline(lm(y~x))}) # doesn?t work
>
>
> Thanks!
>
> Christoph
>
>
>
--
Felix Andrews / ???
PhD candidate
Integrated Catchment Assessment and Management Centre
The Fenner School of Environment and Society
The Australian National University (Building 48A), ACT 0200
Beijing Bag, Locked Bag 40, Kingston ACT 2604
http://www.neurofractal.org/felix/
3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8