[R-pkg-devel] no visible binding for '<<-' assignment note

Richard M. Heiberger rmh @end|ng |rom temp|e@edu
Fri Feb 21 19:43:15 CET 2020


I would guess that your NAMESPACE file doesn't export dnormfun.

On Fri, Feb 21, 2020 at 1:38 PM Weimin Zhang <zhangwm using hotmail.com> wrote:
>
> Thank you Max.
>
> The reason I used the super assignment  "<<-"  is because the "dnormfun" function later called by function kronecker(X, Y, FUN = "*",...) through FUN=" ". If I don't use the super assignment  "<<-"  then the kronecker function cannot find "dnormfun" function. The question now seems that how I can let the kronecker(X, Y, FUN = "*",...) know that "dnormfun" is a "FUN"?
>
> Thanks,
> Weimin
>
>
> ________________________________
> From: Max Turgeon <Max.Turgeon using umanitoba.ca>
> Sent: Thursday, February 20, 2020 10:50 AM
> To: Weimin Zhang <zhangwm using hotmail.com>; r-package-devel using r-project.org <r-package-devel using r-project.org>
> Subject: Re: no visible binding for '<<-' assignment note
>
>
> Hi Weimin,
>
>
> From the R docs, if there is no visible binding for the deep assignment, meaning there is the variable "dnormfun" not already defined in the parent environment, then an assignment is made in the global assignment. Is this really what you want to do, define a function "dnormfun" that is available in the user's global environment? If yes, then you'll need to make a case for it in your CRAN submision comments. If no, then you can probably just change "<<-" to "<-".
>
>
> Best,
>
>
> Max Turgeon
> Assistant Professor
> Department of Statistics
> Department of Computer Science
> University of Manitoba
> maxturgeon.ca<http://maxturgeon.ca>
>
>
> ________________________________
> From: R-package-devel <r-package-devel-bounces using r-project.org> on behalf of Weimin Zhang <zhangwm using hotmail.com>
> Sent: February 19, 2020 11:48:38 AM
> To: r-package-devel using r-project.org
> Subject: [R-pkg-devel] no visible binding for '<<-' assignment note
>
> Dear all,
> In the last submission of my package the CRAN gave this note: "Check: R code for possible problems, Result: NOTE: no visible binding for '<<-' assignment..."
>
> How can I bypass this note?
>
> This is the local function which cause this note:
>   dnormfun <<- function(muvalue, sigmavalue, aNumber = gridY[i] ){
>     force(aNumber)
>     ansvalue=dnorm(aNumber,muvalue,sqrt(sigmavalue))
>     return(ansvalue)
>   }
>
> The package can run normally at my machine. Any suggestion?
>
> Thanks,
>
> Weimin
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list