[R-pkg-devel] no visible binding for '<<-' assignment note
Max Turgeon
M@x@Turgeon @end|ng |rom um@n|tob@@c@
Thu Feb 20 16:50:17 CET 2020
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]]
More information about the R-package-devel
mailing list