I am writing a R script to run the commands in the front-end in ubuntu:
Rscript my_scripts.R my_file.txt output_file
However, it gave me an error like "Error: unexpected symbol in "Rscript my_scripts.R"
I came upon this post R command line passing a filename to script in arguments (Windows). and I quote the answers "As I said in my comment, I would use Rscript instead of R CMD BATCH:"
So I found that in order to run this, I have to install
sudo apt-get install littler
according to this post Rscript on ubuntu
When I finished install this package, it still showed the same error message. Any solutions?
Best,