Hello,
I am new to RStudio and I have observed that code diagnostics across multiple r files doesn't work as I expected.
I have the following structure:
project/
--project.Rproj
--main.r
--source/
----my_function.r
content of main.r:
source("source/my_function.r")
my_function()
content of my_function.r:
my_function <- function(){
print("Hello")
}
After calling source("source/my_function.r") my_function is in the Global Environment.
I can use ctrl-click on my_function() in main.r to get to the definition but I still get a warning symbol in main.r saying "no symbol named 'my_function' in scope" because there is no my_function defined within main.r. This warning is not useful.
Can I make code diagnostics to take into account the sourced file and not show a warning in this case? (Without disabling this type of warning in general.)