作成された既存の格子パネルにポイントまたはデータ シリーズを追加する方法を見つけようとしています。これは、plot.points および/または update 関数と関係がありますか?
# Initialize first plot
library(lattice)
a <- xyplot(Sepal.Length~Sepal.Width, groups=Species, data=iris
, subset=Species %in% levels(Species)[1:2])
print(a)
# Create second plot to overlay or merge with the first plot
b <- xyplot(Sepal.Length~Sepal.Width, groups=Species, data=iris
, subset=Species %in% levels(Species)[3])
# Initial attempt at merging plots:
library(latticeExtra)
print(c(a,b)) # this displays the data in an adjacent second panel
print(c(a,b,layout=c(1,1))) # and this only shows series "b"
注: この例では、プロット "a" と "b" の両方が元のirisデータフレームから取得されていますが、理想的には、ソリューションは個別のデータフレームで機能します。
何か案は?ありがとう!
ブライアン