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 <[EMAIL PROTECTED]> 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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.