Hi Naresh Gurbuxani,

There are already several answers dealing with the specific code that you 
wrote, but my reaction is to step back a little.

R CMD � starts an R session but takes standard input from a file. (In Unix-like 
systems you might even be able to make an R script into an executable file.) I 
think it even uses the same .Rprofile as a regular R session. If there is a 
problem, you can paste the code a few lines at a time into a new ordinary R 
session. Then you can also set breakpoints (using debug, trace, or similar) in 
whatever functions you think caused the problem. You could also wrap all the 
code in a function and use the debugger to step through that (which may help if 
the error occurs in an iteration of a loop body).

Regards,
Jorgen Harmse.


Message: 1
Date: Mon, 27 Jan 2025 22:46:21 +0000
From: Naresh Gurbuxani <naresh_gurbux...@hotmail.com>
To: "r-help@r-project.org" <r-help@r-project.org>
Subject: [R] R CMD check says no visible binding for global variable
Message-ID:
        
<ia1p223mb0499637a346d65f7b4c2ea8cfa...@ia1p223mb0499.namp223.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

I have written a function which returns an SQL query result as a data.frame.  
Each column of data.frame is a variable not explicitly defined.

For every column name, R CMD check says �no visible binding for global variable 
<name>. Status: 1 NOTE

Is it possible to tell R CMD check that these variables are OK?

Thanks,
Naresh

Sent from my iPhone



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to