On Tue, Sep 24, 2019 at 11:13 AM Gábor Csárdi wrote:
>
> I believe that this is because if it is outside of a function, then it
> runs at INSTALL time, and codetools checks the installed code, i.e.
> the function objects typically, and the checks never see the
> globalVariables() call.
That
I believe that this is because if it is outside of a function, then it
runs at INSTALL time, and codetools checks the installed code, i.e.
the function objects typically, and the checks never see the
globalVariables() call.
Gabor
On Tue, Sep 24, 2019 at 7:08 PM Henrik Bengtsson
wrote:
>
> 'R
'R CMD check' will give a warning that 'speed' is an unknown variable in:
low_speeds <- function(limit) {
subset(datasets::cars, speed <= limit)
}
We can tell 'R CMD check' that 'speed' is a false positive by
declaring it a "global" variable. This can be done, by:
low_speeds <-