Bug 16884 - codetools::findGlobals misses global variable
Summary: codetools::findGlobals misses global variable
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Add-ons (show other bugs)
Version: R 3.2.4
Hardware: x86_64/x64/amd64 (64-bit) OS X Mavericks
: P5 minor
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-05-05 22:49 UTC by Dan Sullivan
Modified: 2016-05-05 22:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Sullivan 2016-05-05 22:49:21 UTC
Here is a case where the variable "x" is missed by findGlobals

Steps to reproduce:

x <- 1
fn2 <- function() {
  x <- x + y
  x
}
codetools::findGlobals(fn2)

produces

[1] "{"  "+"  "<-" "y"