Related to the discussion in this post.
There are multiple ways of executing an R-file. Each of these methods have either challenges in input or output. Which are acceptable to count as "Full program" and how do we score them?
The options are:
Using the command line command
rscript <filename>. This seems to be the most intuitive way to call a script. However, STDIN needs to be explicitly calls when using
scan(), which is one of the most popular methods of reading input in full programs. This would become
scan(file("stdin")). Also, this requires explicit printing, using
sourcein the R console.
sourceis similar to Python's
import, it executes a given file. STDIN works properly without modifications, but printing is the same problem as
echo = TRUE(which can be abbreviated to
ec=T). This will print all executed lines of code with their output as if they were executed directly in the console.
If I missed any, please let me know.
The question is two-part: Do we allow
source as a way to execute or only
source is allowed, how do we score its arguments?