[Rd] Note: no visible definition
edd at debian.org
Sat Apr 9 19:54:05 CEST 2016
On 9 April 2016 at 10:28, Mick Jordan wrote:
| Can someone explain a message of this form from an rscript execution:
| Note: no visible global function definition for 'foo'
| This happens right at the start of execution. 'foo' is only executed in
| a branch of an 'if' that is not reached with the particular arguments
| passed to the script. If I source the script in a shell and run it I do
| not get the message.
Guess: your shell session has an object foo. It will be referenced.
Your Rscript, running from 'empty' never defines foo. And codetools tells
you that because more often than not it is error. Sometimes codetools gets
it wrong too, ie with you peek into data structure via evaluation tricks or
with simple with(mydataframe, columnOne).
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-devel