ailto:npra...@mednet.ucla.edu]
Sent: Monday, June 3, 2013 12:31 PM
To: dcarl...@tamu.edu
Cc: r-help@r-project.org
Subject: Re: [R] Y-lim minimum overrun in barplot
Thank you for the three (!) solutions suggested. I found that the
base subtraction trick worked well, but I investigated all three:
4352
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Nicole Prause
Sent: Friday, May 31, 2013 11:31 AM
To: r-help@r-project.org
Subject: [R] Y-lim minimum overrun in barplot
The code below produces the plot hosted here:
http://www.span-lab
g<mailto:r-help-boun...@r-project.org>
[mailto:r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org>] On
Behalf Of Nicole Prause
Sent: Friday, May 31, 2013 11:31 AM
To: r-help@r-project.org<mailto:r-help@r-project.org>
Subject: [R] Y-lim minimum overrun in barplot
T
Nikky,
It is helpful if you provide a simplified version of your question with
data. For example:
# simplified example
y <- c(2.2, 2.4, 2.35, 2.45)
upper <- 0.17
lower <- upper
# current plot, with default base of 0
b <- barplot(y, ylim=c(2, 3))
arrows(b, y+upper, b, y-lower, angle=90, code=3)
The code below produces the plot hosted here:
http://www.span-lab.com/ChartStop.jpeg
error.bar <- function(x, y, upper, lower=upper, length=0.1,...){
if(length(x) != length(y) | length(y) !=length(lower) | length(lower) !=
length(upper))
stop("vectors must be same length")
arrows(
5 matches
Mail list logo