[R] Plot and lm

stephen sefick ssefick at gmail.com
Thu Jun 4 20:13:34 CEST 2009


I can't copy and paste your example right out of you email and into an
R session.
?dput

and then see if you can copy and paste it into an R session and make
it work.  That way it is easier for everyone and you have a better
chance of getting helpful responses.
HTH

Stephen Sefick

On Thu, Jun 4, 2009 at 1:47 PM, Par Leijonhufvud
<par at hunter-gatherer.org> wrote:
> stephen sefick <ssefick at gmail.com> [2009.06.04] wrote:
>> Could you provide a reproducible example even with fake data would be
>> fine or dput() yours.
>
> Sorry, I don't understand what you mean. Im my post was the first 8 lines of
> my data, imported into R with
>
> islands <- read.table("islands.csv", sep=",", h=T)
>
> and the code was a cut-and-past from my .Rhistory. When I run it I get a
> nice graph, but no line from abline (unless it is vertical or horizontal
> and "superimposed" uppon one of the axes)... Which turns out ot be the
> case:
>
> Just running lm I get
>
>> lm(mass~area)
>
> Call:
> lm(formula = mass ~ area)
>
> Coefficients:
> (Intercept)         area
>  3.615e+02    5.967e-05
>
>> lm(logmass~logarea)
>
> Call:
> lm(formula = logmass ~ logarea)
>
> Coefficients:
> (Intercept)      logarea
>    -1.3480       0.4747
>
>
> Forcing the graph with ylim=c(0,001,100000000) I see a line from the latter,
> but (no surprise) none from the former. Now I just need to fix my
> assumptions such that I produce a line that is an actual regession
> line...
>
> Thanks for making me think it through!
>
> /Par
>
> --
> Par Leijonhufvud                               par at hunter-gatherer.org
> The best comment I heard about Starship Troopers was "Based on the back cover
> of a book by RAH".
>                -- Paul Tomblin
>
> ______________________________________________
> R-help at 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.
>



-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis




More information about the R-help mailing list