On 26.05.2012 08:17, Jhope wrote:
Hi R-listers,

I am having trouble plotting the values for the R2 line, lowess smooth,
smothered conditional spread, outlier identification.
I have tried the function text and legend but was unsuccessful. Please see
below.

Your help would be appreciated. Thanks in advance.

Jean



library(car)
SPHSHTL<- scatterplot(HSuccess ~ HTL,
+                        data = data.to.analyze,
+                        xlab = "Distance to high tide line (metres)",
+                        ylab = "Hatching success (%)")

legend("topright", bty="n", legend=paste("R2 is",
+
format(summary(SPHSHTL)$adj.r.squared, digits=4)))

scatterplot() does not return anything useful, and in particular it does not include any element called "adj.r.squared".
I think you want to fit a model using lm() or so and proceed from there?

Uwe Ligges






Error in summary(SPHSHTL)$adj.r.squared :
   $ operator is invalid for atomic vectors

text(SPHSHTL)
Error in text.default(SPHSHTL) : zero length 'labels'

--
View this message in context: 
http://r.789695.n4.nabble.com/Values-in-scatterplot-tp4631431.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

______________________________________________
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.

Reply via email to