You say you are aware that you can source them from a common script, yet you 
don't seem satisfied with that. 

Perhaps you could be more specific about why that solution is not satisfactory?

One thing you said could indicate a misunderstanding... you do not have to wrap 
the code in functions before you source the files.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<[email protected]> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

Dimitri Liakhovitski <[email protected]> wrote:

Hello! I am wondering if it's possible to run - in sequence - code that is 
stored in several R scripts. For example: Script in the file "code1.r" contains 
the code: a = 3; b = 5; c = a + b Script in the file "code2.r" contains the 
code: d = 10; e = d - c Script in the file "code3.r" contains the code: 
result=e/a I understand that I could write those 3 scripts as 3 functions and 
source them from another script. But maybe there is a way of having them run 
one by one as such? Thanks a lot! -- Dimitri Liakhovitski Ninah Consulting 
www.ninah.com_____________________________________________
[email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 
and provide commented, minimal, self-contained, reproducible code. 


        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to