[R] A question about par.plot in gamlss

From: hari iyer <harikiyer_at_hotmail.com>
Date: Wed 27 Jul 2005 - 13:52:44 EST


Hello
I am using the following code to plot a data matrix into a form that seems suitable for
the use of par.plot.

library(gamlss)

a<-matrix(c(1,2,3,4,5,6,7,8,9,8,7,6),nrow=3)
rownames(a)<-c("trt1","trt2","trt3")
colnames(a)<-c("col1","col2","col3","col4")
hpar.plot<-function(ZZ){
ZZvar<-c(t(ZZ))
ZZtrt<-c(matrix(rep(1:ncol(ZZ),nrow(ZZ))))
ZZcov<-as.factor(c(t(matrix(rep(rownames(ZZ),ncol(ZZ)),nrow=nrow(ZZ)))))
par.plot(ZZvar ~ ZZtrt,sub=ZZcov)
}
hpar.plot(a)

I keep getting the following error message:

Error in eval(expr, envir, enclos) : Object "ZZvar" not found

I am unable to figure out my error. Can someone help please? Thanks in advance.

Hari



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 Received on Wed Jul 27 13:57:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:02 EST