[Rd] plotCI error when trying to omit upper or lower bars (PR#7764)
volker.franz at tuebingen.mpg.de
volker.franz at tuebingen.mpg.de
Fri Apr 1 06:25:58 CEST 2005
Full_Name: Volker Franz
Version: 2.0.1 (2004-11-15)
OS: Mac OSX / Debian
Submission from: (NULL) (84.58.8.232)
Hi there,
the new version of plotCI (Version: 2.0.3 of gplots) produces errors
if the upper or lower error bars should be omitted by passing NULL as
an argument. Older versions of plotCI had no problem with this. Here
is an example:
library(gplots)
means <- c(1,2,3,4,5)
upperw <- c(1,1,1,1,1)
lowerw <- c(1,1,1,1,1)
upper <- means+upperw
lower <- means-lowerw
plotCI(x=means,uiw=upperw,liw=lowerw) #Works fine
plotCI(x=means,ui=upper,li=lower) #Works fine
##Error with uiw and liw:
plotCI(x=means,uiw=NULL,liw=lowerw) #Error: subscript out of bounds
plotCI(x=means,uiw=upperw,liw=NULL) #Error: subscript out of bounds
##Error with ui and li:
plotCI(x=means,ui=NULL ,li=lower) #Error: Argument "uiw" is missing, with no
default
plotCI(x=means,ui=upper,li=NULL) #Error: Argument "uiw" is missing, with no
default
##These are errors, because the plotCI-help says:
## uiw: width of the upper or right error bar. Set to 'NULL' omit
## upper bars.
## liw: width of the lower or left error bar. Defaults to same value
## as 'uiw'. Set to 'NULL' to omit lower bars.
## ui: upper end of error bars. Defaults to 'y + uiw' or 'x + uiw'
## depeding on 'err'. Set to 'NULL' omit upper bars.
## li: lower end of error bars. Defaults to 'y - liw' or 'x - liw'
## depedning on 'err'. Set to 'NULL' to omit lower bars.
Best
Volker
More information about the R-devel
mailing list