using a variable written in "Script.R" from another script in which I use source(here("Script.R"))

I know that if I run the source(here("Script.R")) code in the script I am writing, I can call the functions written in the called script (Script.R). Can I also have direct access to the variables defined in the called script?

for example: the script I am calling contains the variable x. Can I use the variable x in the script from which I am calling "Script.R"?

Yes. The code is executed and any variables created should be in the environment.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.