Re: [R] A question about par.plot in gamlss

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 27 Jul 2005 - 17:38:47 EST

As the posting guide says, please ask the package maintainer -- I believe he does not read R-help regularly.

Your layout is hard to read (please do use spaces and indentation in posted code), but probably there is a scoping problem with par.plot used inside a function.

On Wed, 27 Jul 2005, hari iyer wrote:

> 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
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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 17:42:47 2005

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