I have several plots where I'd like to add the formula from the linear model automatically, i.e. in form of y=ax+b, to the plot. I used lm() for a simple scatter plot. I was able to add the r-sqare to the plot, using summary(lm$r.square) to extract the value for r^2. but for the coefficients a and b I couldn't extract the values like for r-square. I can check the values using coef(lm), but to be able to write it as text to the plot I should extract the values, am I right? Or is there a better solution? Does anyone has an idea? I couldn't find any yet...
Thanks a lot,Thomas __ Thomas Szegvary Institute of Environmental Geosciences Department of Geosciences University of Basel Bernoullistrasse 30 CH - 4056 Basel Tel. 41-61-267 04 82 Fax. 41-61-267 04 79 Email: [EMAIL PROTECTED] www.radon.unibas.ch www.unibas.ch/environment _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo