RStudio - no symbol named 'X' in scope

Viewed 4637

Why do I get the yellow triangular warnings in the LHS margin in RStudio when using packages like dplyr? When I begin to use my current version of RStudio (1.0.136) there are no warnings. Then I start to code, mistype something, and a whole bunch of the yellow triangles appear. Yet if I restart RStudio, I begin again with none.

no symbol named X in scope

Is there a way to suppress and/or prevent this?

3 Answers

Please try to execute that function associated with variable outside explicitely so that one global variable will be generated named "site_os_id".

hist( AGE, col = " Dark Grey")

while executing above statement I got error as "No symbol named AGE in scope". Then I executed this statement AGE <- hc$AGE and then again same above query works.

To get rid of the warnings, you can trick RStudio as follows:

# Source and define variables to prevent code diagnostic warnings
source("the_other_script.R")

if (FALSE) {
  variable1 <- NULL
  variable2 <- NULL
  # etc.
}
Related