0

I am trying to run an Rscript from my terminal to check that I made my code properly for class. Whenever I run my Rscript` using the command :

Rscript --vanilla -e ‘source(“file.R”)’ -e ‘print()’

I get the output of just

quote> 

I checked my code and my file and I should at least get something. When I run in RStudio my code produces something. Do you know what I can do to fix this? or any can suggestions on what I am doing wrong?

yuliaUU
  • 1,581
  • 2
  • 12
  • 33
Julie
  • 1
  • 1
  • 1
    What exactly is in the "file.R" script? What OS are you using? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) that can be used to test and verify possible solutions. Try a simple script with like 1 line of code and see if the same thing happens. – MrFlick Mar 19 '22 at 19:58
  • 2
    R doesn't like "fancy quotes", try changing `“file.R”` to `"file.R"` (notice the difference in quotation marks). – r2evans Mar 19 '22 at 19:58

0 Answers0