ラティスの xyplot で生成されたライン プロットがあります。測定された 2 種類の温度が含まれており、そのうちの 1 つは平均値です。したがって、これらの点に標準誤差を追加したいと思います (t.tort)。残念ながら、これを個別に行うと、 (Hmisc)errbar を使用して機能しません... これまでに私が思いついたものは次のとおりです。
xyplot(mean.tort+t.ws~DateTime, pre, type=c("a", "p"), col=c("red", "blue"),
main="Pre-Translocation",
xlab=list(label="Date and Time", cex=1),
ylab=list(label="Temperature (°C)", cex=1),
scales = list(tck = c(1, 0),
x=list(cex=0.8, rot=45, tick.number=40),
y=list(cex=0.8, tick.number=8, limits=c(29,43))),
key=list(text=list(c("Tortoise","Ambient")), lines=list(col=c("red", "blue"),type="l"), corner=c(0.5,0.92)))
errbar(x=pre$DateTime, y=pre$mean.tort, yplus=pre$mean.tort+pre$se.tort,yminus=pre$mean.tort-pre$se.tort,
add=T, col="red")
私のデータフレームの重要なビットは次のとおりです。
pre$DateTime<-c(as.POSIXct("2013-01-27 09:00:00" "2013-01-27 10:00:00" "2013-01-27 11:00:00" "2013-01-27 12:00:00" "2013-01-27 13:00:00")
pre$t.ws<-c(32.7, 35.5, 37.1, 37.6, 38.7)
pre$mean.tort<-c(32.4, 34.9, 35.1, 36.8, 37.7)
pre$se.tort<-c(0.825, 0.84, 0.21, 0.228, 0.28)
私はこれに少しイライラしたので、どんな提案でも大歓迎です。事前にご尽力いただき、誠にありがとうございます。