[R] difference between script and a function....

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Sat Dec 24 15:09:37 CET 2022


Dear members,
                            I will be running scripts automatically in RHEL with crontab. I want to know the differences between running  a script and a function. in particular:


  1.  An execution environment will be created for the function. what about a script? Is the execution environment the global environment?
  2.  What happens if I use return() at the end of a script?
  3.  I came to know that when you use R CMD BATCH, a file will be created and the output will be saved to the file. How do I output what I want to output in a script? Should I use return()? Will ALL the intermediate objects be stored ?
  4.  When I run a script, it will have access to the objects in the global environment right? i.e I can use all the functions in the global environment, right?
  5.  Any links to resources for further information? How do i access the relevant documentation?

ANy help will be greatly appreciated...

thanking you,
yours sincerely,
AKSHAY M KULKARNI

	[[alternative HTML version deleted]]



More information about the R-help mailing list