Following is a detailed explanation for each line in the above script file. First line is a comment and a comment in R programming language starts with # (hash) symbol. There are only single line comments supported in R language, though there is a work around for multiple line comments. Second line is an assignment of value “Hello World!” to the variable aString.
Run the VB script called myscript.vbs: C: > cscript myscript.vbs. If the line above is saved as a batch script, double clicking the batch file will run the VBScript file. Call one VB script from another.
In the third line, we are printing the variable aString which is holding the value “Hello World!”. Run R Script File R language provides an R Interpreter. It can invoked using the command Rscript in the terminal.
To run an R script file in the Terminal command prompt, following is the syntax.