Re: [R] No visible binding for global variable

2017-01-29 Thread Naser Jamil
Dear Prof John, I have got the points now. Many thanks for your suggestions. Regards, Jamil. On 28 January 2017 at 00:27, Fox, John wrote: > Dear Jamil, > > Presumably, the variables alloc.dose, r0, r1, and r2 will exist in the > global environment when you call the compiled function lf1.c(), b

Re: [R] No visible binding for global variable

2017-01-27 Thread Fox, John
Dear Jamil, Presumably, the variables alloc.dose, r0, r1, and r2 will exist in the global environment when you call the compiled function lf1.c(), but didn’t exist when you compiled the function. If so, then lf1.c() should work properly despite the notes (not errors, or even warnings) that was

[R] No visible binding for global variable

2017-01-27 Thread Naser Jamil
Dear R-users, I would like to seek your suggestion. I have the following code which runs smoothly. But when I compile the function (lf1.c), it shows "no visible binding for global variable" for some of the arguments. ### library(compiler) psi0<-function(theta1,th

Re: [R] "no visible binding for global variable" and with() vs. within()

2014-08-22 Thread Henrik Bengtsson
I'm dealing with these type of false NOTEs as: foo1 <- function (bar) { # To please R CMD check x <- NULL; rm(list="x") with(bar, { x }) } Of course, that may one day break with more clever code inspections. My $.02 /Henrik On Fri, Aug 22, 2014 at 2:40 AM, Martin Maechler wrote

Re: [R] "no visible binding for global variable" and with() vs. within()

2014-08-22 Thread Martin Maechler
> Rolf Turner > on Mon, 18 Aug 2014 08:47:36 +1200 writes: > On 17/08/14 23:05, Duncan Murdoch wrote: >> On 16/08/2014, 9:36 PM, Daniel Braithwaite wrote: >>> R CMD check does not object to this code when checking a >>> package: >>> >>> foo1 <- function (bar)

Re: [R] "no visible binding for global variable" and with() vs. within()

2014-08-17 Thread Rolf Turner
On 17/08/14 23:05, Duncan Murdoch wrote: On 16/08/2014, 9:36 PM, Daniel Braithwaite wrote: R CMD check does not object to this code when checking a package: foo1 <- function (bar) { with(bar, { x }) } but produces a warning: foo2: no visible binding for global variable 'x' in r

Re: [R] "no visible binding for global variable" and with() vs. within()

2014-08-17 Thread Duncan Murdoch
On 16/08/2014, 9:36 PM, Daniel Braithwaite wrote: > R CMD check does not object to this code when checking a package: > > foo1 <- function (bar) { > with(bar, { > x }) > } > > but produces a warning: > > foo2: no visible binding for global variable 'x' > > in response to this: > >

[R] "no visible binding for global variable" and with() vs. within()

2014-08-17 Thread Daniel Braithwaite
R CMD check does not object to this code when checking a package: foo1 <- function (bar) { with(bar, { x }) } but produces a warning: foo2: no visible binding for global variable 'x' in response to this: foo2 <- function (bar) { within(bar, { x }) } Is this an R bug, o

Re: [R] No Visible Binding for global variable

2009-11-16 Thread Duncan Murdoch
On 11/16/2009 1:54 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Doran, Harold Sent: Monday, November 16, 2009 10:45 AM To: r-help@r-project.org Subject: [R] No Visible Binding for global variable

Re: [R] No Visible Binding for global variable

2009-11-16 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Doran, Harold > Sent: Monday, November 16, 2009 10:45 AM > To: r-help@r-project.org > Subject: [R] No Visible Binding for global variable > > While build

[R] No Visible Binding for global variable

2009-11-16 Thread Doran, Harold
While building a package, I see the following: * checking R code for possible problems ... NOTE cheat.fit: no visible binding for global variable 'Zobs' plot.jml: no visible binding for global variable 'Var1' I see the issue has come up before, but I'm having a hard time discerning how solutions