[R] "NOTE" warning

Duncan Murdoch murdoch at stats.uwo.ca
Tue May 20 12:43:32 CEST 2008


On 20/05/2008 6:27 AM, Mikis Stasinopoulos wrote:
> 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?

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


> 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
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list