On Jun 13, 2012, at 10:29 AM, Kristi Glover wrote:
Hi R experts,
Could you please help me to fit a linear, cubic and quadratic curve
in a figure? I was trying to show all these three fitting curves
with different colour in one figure.
I spent substantial time to figure it out, but I could
el type takes care of the details.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
>> -Original Message-
>> From: r-help-bounces@ [mailto:r-help-bounces@] On Behalf
>> Of Robert Baer
>> Sent: Wednesday, June 13, 2012 8:40 AM
>> To: Kr
oject.org] On
> Behalf
> Of Robert Baer
> Sent: Wednesday, June 13, 2012 8:40 AM
> To: Kristi Glover; R-help
> Subject: Re: [R] How to plot linear, cubic and quadratic fitting curve in a
> figure?
>
>
> > dput(test)
> structure(list(sp = c(4L, 5L, 9L, 12L, 14L), e
dput(test)
structure(list(sp = c(4L, 5L, 9L, 12L, 14L), env = c(12L, 18L,
20L, 17L, 15L)), .Names = c("sp", "env"), class = "data.frame", row.names =
c(NA,
-5L))
plot(test$sp~test$env, main = "S vs. temp", xlim=c(0,20), ylim=c(0,14),
ylab="S",xlab="env")
linear<-lm(test$sp~test$env)
quadrat
Hi, Kristi-
Here is an option.
?curve...to add the polynomials to your graph
?textfor adding the R2 to you plot
Ken
On 06/13/12, Kristi Glover wrote:
>
> Hi R experts,
> Could you please help me to fit a linear, cubic and quadratic curve in a
> figure? I was trying to show all these three
Hi R experts,
Could you please help me to fit a linear, cubic and quadratic curve in a
figure? I was trying to show all these three fitting curves with different
colour in one figure.
I spent substantial time to figure it out, but I could not.
I have given here a example and what I did for l
6 matches
Mail list logo