[R] How can i draw a graph with high and low data points

Greg Snow Greg.Snow at imail.org
Tue Jul 13 17:59:03 CEST 2010


There are several functions in several packages for plotting intervals that will give you plots much better than the excel one.  The RSiteSearch function or the sos package may help you find those. 

But it is also easy to create such plots using just a few lines of R code and base graphics.  Read the help pages for plot.default (look at the ylim argument) and the segments function (the order and seq functions may also be of use).

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Nathaniel Saxe
> Sent: Tuesday, July 13, 2010 2:36 AM
> To: r-help at r-project.org
> Subject: Re: [R] How can i draw a graph with high and low data points
> 
> 
> I have 5 columns- Trial.Group, Mean, Standard Deviation, Upper
> percentile,
> Lower percentile.
> 
> Trial.Group     41 subjects: 3 to 4 yrs-Male
> Mean             444
> SD                 25
> upper             494
> lower             393
> 
> and all the data is like that.
> 
> and i wish to recreate this excel table.
> http://r.789695.n4.nabble.com/file/n2287158/untitled.GIF untitled.GIF
> 
> 
> 
> problem with my code- doesn't put Trial.Group on the x axis
> 
> 
> Thanks for the help
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/How-can-i-
> draw-a-graph-with-high-and-low-data-points-tp2282524p2287158.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