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

2020-02-21 Thread Max Turgeon
The only thing I know about your package is the code you've shared so far, so I may be wrong. If I understand correctly, you're using kronecker and dnormfun to evalute the normal density at several values of mu and sigma, but a fixed point x. And you're fixing that point x in dnormfun, with the

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

2020-02-21 Thread Richard M. Heiberger
I would guess that your NAMESPACE file doesn't export dnormfun. On Fri, Feb 21, 2020 at 1:38 PM Weimin Zhang 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="

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

2020-02-21 Thread Weimin Zhang
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 see

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

2020-02-20 Thread Max Turgeon
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