This example code
foo <- data.frame(0)
foo$bar <- 1
zero <- function() {
file.info("/dev/null")$size
}
message(zero())
lints with this error:
<text>:5:28: warning: no visible binding for global variable ‘size’
file.info("/dev/null")$size
^~~~
lintr::lint('
foo <- data.frame(0)
foo$bar <- 1
zero <- function() {
file.info("/dev/null")$size
}
message(zero())
')
The error disappears when you take away the foo$bar <- 1:
lintr::lint('
foo <- data.frame(0)
zero <- function() {
file.info("/dev/null")$size
}
message(zero())
')
This example code
lints with this error:
The error disappears when you take away the
foo$bar <- 1: