[R] Showing which bars in a bar chart are significantly different
John Kane
jrkrideau at yahoo.ca
Wed Jul 6 23:01:10 CEST 2011
# Incremental approach
bb <- c(23, 45, 67)
bsp <- barplot(bb,beside=TRUE) # get midpoints of the bars and plot
# draw lines
segments( .7, 50, 1.9, 50)
segments(.7, 50, .7, 48)
segments(1.9, 50, 1.9, 48)
# Or all in one go
segments(c(.7, .7, 1.9), c(50,50,50), c(1.9,.7,1.9), c(50, 48, 48))
--- On Wed, 7/6/11, omernevo <nevo84 at gmail.com> wrote:
> From: omernevo <nevo84 at gmail.com>
> Subject: [R] Showing which bars in a bar chart are significantly different
> To: r-help at r-project.org
> Received: Wednesday, July 6, 2011, 4:37 PM
> Hello,
>
> a probably rather stupid question to which I can't find an
> answer:
>
> I have a bar chart, and I want to present which bars are
> significantly
> different by placing a line with an asterisk above then
> (similarly to fig. 3
> in: http://jnm.snmjournals.org/content/46/4/574.figures-only).
>
> Does anyone have a reference where can I find some
> instructions how to learn
> this?
>
> Thanks a lot!
> Omer
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Showing-which-bars-in-a-bar-chart-are-significantly-different-tp3649897p3649897.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