Skip to main content

How to run R scripts from the command line

Comments

2 comments

  • Gaurav

    n my Linux-based web-hosting when I am running the command Rscript, it's saying the command does not exist, any resolutions pl?

    0
  • Cecil Singh

    Hi Gaurav,

    That does seem strange. Rscript is provided when you install R. It may be worth checking that R is correctly installed on your system. If this is the case, ensure that PATH refers to the correct Rscript. You can run something like the below to find this:

    which Rscript

    Note that this should be within the same directory that exists when you run:

    which R

    Best of luck! I hope this helps point you in the right direction.

    0

Article is closed for comments.