library(marray)
library(lattice)
data(swirl)
data <- data.frame(M=as.vector(maM(swirl)), A=as.vector(maA(swirl)), Sample=rep(paste("Array", 1:4), each=nrow(swirl)))
xyplot(M~A|Sample, data=data,
panel = function(x, y) {
panel.grid(h=-1, v= 2)
panel.xyplot(x, y)
panel.loess(x, y, span=0.25, col="black")
panel.pspline(x, y, col="red", lwd=2)})
Run the code above in your browser using DataLab