I am new to R and want some help to execute .R script.
I have saved a test.R script in Documents folder on my windows machine.
Need some help for step by step execution of the script using Rterm.
Below is the error that I get when I try to execute the script. I have already set the directory in Rterm.
Rscript test.R
Error: unexpected symbol in "Rscript test.R"
This is usually caused by code with punctuation errors, such as failing to close a “quotation mark. Can’t say where, of course without seeing the code.
This command is meant to be run from a system terminal, not an R console.
I think you are trying to use an R console (what you get by running Rterm) as if it was a system terminal and that is not possible. If you want to execute an .R file from an R console use the source() function.