In qqmath, how would one go about having 'distribution' change with 
panel.number? I've tried

set.seed(1)
mydata <- data.frame(ind = factor(rep(2:4, each = 100)))
mydata$val <- rt(300, df=rep(2:4, each = 100))


plot<-qqmath(~ val | ind,
             layout=c(3,1),
             data = mydata,
             prepanel = function(x, distribution, ...) {
                mydist<-function(p) qt(p, df = panel.number() + 1)
                prepanel.qqmathline(x, distribution=mydist,...)
             },
             panel = function(x, distribution, ...) {
                mydist<-function(p) qt(p, df = panel.number() + 1)
                panel.qqmathline(x, distribution=mydist,...)
                panel.qqmath(x, distribution=mydist,...)
             })

But no luck.

Ben

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to