Skip to content

"NOTE" warning

2 messages · Dimitrios Stasinopoulos, Duncan Murdoch

#
Dear all

I am using NAMESPACE in my package but I would like the user to be able 
to overwrite four functions:
  own.linkfun, own.linkinv, own.mu.eta and own.valideta.
 These are used to defined "own" link functions.

Is there any way of doing that without getting the  when I am checking 
the package?
This is what I am getting:
make.link.gamlss : linkfun: no visible binding for global variable
  'own.linkfun'
make.link.gamlss : linkinv: no visible binding for global variable
  'own.linkinv'
make.link.gamlss : mu.eta: no visible binding for global variable
  'own.mu.eta'
make.link.gamlss : valideta: no visible binding for global variable
  'own.valideta'

Thanks

Mikis Stasinopoulos


Companies Act 2006 : http://www.londonmet.ac.uk/companyinfo
#
On 20/05/2008 6:27 AM, Mikis Stasinopoulos wrote:
In your own code, you could explicitly "get" them.  For example,

own.linkfun <- get("own.linkfun", env=globalenv())
  ...

However, this isn't a great design.  What if the user wants to work on 
two different models, with different link functions?  It would be better 
to pass the functions (or a list containing them) to your code as 
arguments to the call to your function.  That's how glm() does it.

Duncan Murdoch