From murdoch at stats.uwo.ca  Fri May 25 13:57:48 2007
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Fri, 25 May 2007 07:57:48 -0400
Subject: [Rd] private variables in package.
In-Reply-To: <10801165.post@talk.nabble.com>
References: <10800416.post@talk.nabble.com>	<Pine.LNX.4.64.0705251155280.14500@gannet.stats.ox.ac.uk>
	<10801165.post@talk.nabble.com>
Message-ID: <4656CF3C.7070809@stats.uwo.ca>

On 5/25/2007 7:27 AM, Vladimir Eremeev wrote:
> Thank you for the answer.
> 
> Here is everything.
> 
> ac9wl<-c(412,440,488,510,532,555,650,676,715)
> ac9nw<-length(ac9wl)
> 
> AB2C <-function(a,b,model.type="S") {  
>   nza<-dim(a)[1]
>   nwa<-dim(a)[2]
>   nzb<-dim(b)[1]
>   nwb<-dim(b)[2]
> 
>   if(nza!=nzb || nwa!=ac9nw || nwb!=ac9nw) {
>     warning('AB2C: Dimensions of the input matrices are invalid')
>     return(NULL);
>   }
> 
>  [ further calculations, they  do not use ac9nw ]  
> }


That would work, so my guess is that you aren't using that function.  If 
you have a function named AB2C in your global environment, R will find 
it before this one, and it may not be able to see the ac9nw variable.

Duncan Murdoch



[Rd] private variables in package.
Duncan Murdoch