この質問は予期しないフォローアップDraw vertical ending of error bar line in dotplotです。引用された質問は首尾よく解決されましたが、警告があります。ドットプロットに3つ以上の条件を導入すると、縦方向のダンプを描画したくない| --o-- |エラーバーの終わりに。エラーバーのティック| --o-- |ドットプロットで3つ以上の条件を引き出さないでください
@Joshがコメントで示唆したように、私はpanel.Dotplot
を更新してそれを解決するのに役立つものは何も出てこなかった最初の行にbrowser()
を注入しました。以下は、更新されたpanel.Dotplot
関数が動作しない4条件のDotplot()
のコードの例です。
require(Hmisc)
#Fake conditions
mean = c(1:18)
lo = mean-0.2
up = mean+0.2
name = c("a","b","c")
cond1 = c("A","B","C")
cond2 = c(rep("E1",9),rep("E2",9))
d = data.frame (name = rep(name,6), mean, lo, up,
cond1=rep(cond1,each=3,times=2), cond2)
# Create the customized panel function
mypanel.Dotplot <- function(x, y, ...) {
panel.Dotplot(x,y,...)
tips <- attr(x, "other")
panel.arrows(x0 = tips[,1], y0 = y,x1 = tips[,2],
y1 = y,length = 0.1, unit = "native",
angle = 90, code = 3)
}
#Draw Dotplot - `panel.Dotplot` doesn't change anything
setTrellis()
Dotplot(name ~ Cbind(mean,lo,up) | cond1 * cond2, data=d, ylab="", xlab="",col=1,
panel = mypanel.Dotplot)
今、私は完全な物語、歓声の@jbaumsを持って!クリーブランドは私たちを誇りに思います;-) –