Skip to content

error bars

8 messages · Nicole Hackman, Michael Lawrence, jdeisenberg +5 more

#
Check out ggplot2:
http://had.co.nz/ggplot2/

Particularly:
http://had.co.nz/ggplot2/geom_errorbar.html

If you need more help you'll have to provide a self-contained set of data/code.

Hopefully you'll soon be completely rid of this strange "excel" of
which you speak :Op

On Wed, Feb 18, 2009 at 9:38 PM, Nicole Hackman
<nicole.hackman at gmail.com> wrote:

  
    
#
Nicole Hackman wrote:
You might also find 
http://users.fmg.uva.nl/rgrasman/rpages/2005/09/error-bars-in-plots.html
this page  to be useful; it doesn't require you to load any new packages.
#
Hi Chun,
Yes, looks like you did. Look at ?interaction, which gives you more
flexibility than ?":".

## Example
diet<-sort(rep(x=c("C","T"),4)) 
vesl<-rep(x=c("A","P"),4) 
mydata<-data.frame(diet,vesl)

mydata$trt <- interaction(mydata$diet, mydata$vesl)
mydata

mydata$trt <- mydata$diet:mydata$vesl
mydata

Regards, Mark.
Chun-Hao Tu wrote:

  
    
#
On Thu, Feb 19, 2009 at 1:19 AM, jdeisenberg <catcode at catcode.com> wrote:
On the other hand, it's a fundamentally limited approach.  With a
small investment in learning ggplot2, you can easily add error bars to
absolutely any type of graphic.

Hadley
#
On Thu, Feb 19, 2009 at 9:50 AM, Jorge Ivan Velez
<jorgeivanvelez at gmail.com> wrote:
Besides the above (good!) solution, you might want to understand why
your original solution didn't work:
The problem here is that you are using && rather than &.  From the man page:

     '&' and '&&' indicate logical AND and '|' and '||' indicate
     logical OR.  The shorter form performs elementwise comparisons in
     much the same way as arithmetic operators.  The longer form
     evaluates left to right examining only the first element of each
     vector.

I trust this makes things clearer.

         -s