[R] Q - scatterplots

John Fox jfox at mcmaster.ca
Fri Feb 10 16:47:44 CET 2012


Dear J.,

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Jhope
> Sent: February-10-12 3:44 AM
> To: r-help at r-project.org
> Subject: [R] Q - scatterplots
> 
> I was able to make a scatterplot but ...
> 
> 1) what does the "86" mean? The "86" shows up on the graph as well.
> 
> > scatterplot (Shells/TotalEggs ~ Sector, data = data.to.analyze)
> [1] "86"

You don't provide enough information to answer your questions. I assume, for
example, that this is the scatterplot() function in the car package. If so,
the function returns the names (in your case, numbers) of outlying
observations, which are also labelled on the graph, but that shouldn't have
happened unless you set the id.n or id.method arguments appropriately.
Beyond the command, you haven't provided any information about the version
of the car package that you're using, or even whether that's what you're
using.

> 
> 2) Also how do you change the Y axis title? I don't want it to read
> Shells/TotalEggs, instead I would like it to read Average Hatching
> Rate (%).

See ?scatterplot, in particular, the ylab argument, assuming again that
you're using scatterplot() in the car package.

> 
> 3) What does this error mean? Rayos if composed of section 1, 2, 3, 4
> and 5
> 
> > scatterplot (Shells/TotalEggs ~ Rayos, data = data.to.analyze)
> Error in plot.window(...) : need finite 'xlim' values In addition:
> Warning messages:
> 1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by
> coercion
> 2: In min(x) : no non-missing arguments to min; returning Inf
> 3: In max(x) : no non-missing arguments to max; returning -Inf

I suspect that Rayos isn't numeric but without the data it's impossible to
tell.

Please see the posting guide for r-help
<http://www.R-project.org/posting-guide.html> for how to formulate an
answerable question.

Best,
 John

--------------------------------
John Fox
Senator William McMaster
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox



> 
> J
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Q-
> scatterplots-tp4375632p4375632.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.



More information about the R-help mailing list