Re: [Rd] private variables in package.

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Fri, 25 May 2007 07:57:48 -0400

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 25 May 2007 - 12:03:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 May 2007 - 13:33:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.