[R-sig-eco] plotting numeric v. factor variables

Hollister.Jeff at epamail.epa.gov Hollister.Jeff at epamail.epa.gov
Mon Jun 8 14:08:04 CEST 2009


Bessie,

Another, non-trellis/lattice way to do this is simply with boxplot().

boxplot(response~factor) will plot a boxplot for each of your factor
levels.

For greater control (i.e. removing whiskers, etc.) of boxplot see the
help on boxplot(), bxp(), and boxplot.stats().

Hope this is along the lines of what you were looking for.

Cheers,
Jeff




***************************
Dr. Jeffrey W. Hollister
US EPA
Atlantic Ecology Division
27 Tarzwell Drive
Narragansett, RI 02882
(401) 782-9655
***************************


                                                                                                                                       
  From:       r-sig-ecology-request at r-project.org                                                                                      
                                                                                                                                       
  To:         r-sig-ecology at r-project.org                                                                                              
                                                                                                                                       
  Date:       06/06/2009 06:01 AM                                                                                                      
                                                                                                                                       
  Subject:    R-sig-ecology Digest, Vol 15, Issue 1                                                                                    
                                                                                                                                       






----- Message from bessie green <bessie.bug at gmail.com> on Fri, 5 Jun
2009 15:02:23 -0800 -----
                                              
      To: r-sig-ecology at r-project.org         
                                              
 Subject:                                     
                                              

Hi.  This seems like it should be really obvious but I haven't been
able to find a way to do it.

I want to plot some data so that i have 3 levels of a factor variable
on the x-axis, and then numeric values for the response variable on
the y-axis.  This would be a plot that is similar to a boxplot with
the data points showing on it, except without the box and whiskers.
Is there a plotting function in R to do this?

thanks,
bessie


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bessie Green Markley
M.S. Candidate, Dept. of Biology and Wildlife
Alaska Cooperative Fish and Wildlife Research Unit
Institute of Arctic Biology
Sheenjek trailer, N. Koyukuk Drive
University of Alaska Fairbanks 99775
907-474-1949



_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list