[R] A question about par.plot in gamlss
hari iyer
harikiyer at hotmail.com
Wed Jul 27 05:52:44 CEST 2005
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
More information about the R-help
mailing list