From wl2776 at gmail.com  Fri May 25 12:21:56 2007
From: wl2776 at gmail.com (Vladimir Eremeev)
Date: Fri, 25 May 2007 03:21:56 -0700 (PDT)
Subject: [Rd] private variables in package.
Message-ID: <10800416.post@talk.nabble.com>


I am sorry, my previous questions about hiding variables from users in a
package were obscure and vague, and would like to clarify them.

This should be a basic question.
I am writing my first package.
It has several functions, which should be callable by users.
These functions use several variables, and I would like to hide these
variables from users.
How can I do it?

For example, the package has a function AB2C, which uses the variable ac9nw.
If I add the file NAMESPACE, exporting only AB2C, then I get the error:
  
   Error in AB2C(a, b, model.type) : object "ac9nw" not found

I also tried to include in the .onLoad function the code, defining these
variables with <<-
However, this code has created all internal variables in the global
environment.


-- 
View this message in context: http://www.nabble.com/private-variables-in-package.-tf3815306.html#a10800416
Sent from the R devel mailing list archive at Nabble.com.



[Rd] private variables in package.
Vladimir Eremeev