Rscript on ubuntu

后端 未结 4 536
灰色年华
灰色年华 2021-02-10 02:01

Where can I install Rscript from? I need to run an R script from a php file using exec. However I need to install Rscript first.

4条回答
  •  鱼传尺愫
    2021-02-10 02:35

    I tried running Rscript in a fresh ubuntu installation (16.04.2 LTS) and got:

    The program 'Rscript' is currently not installed. You can install it by typing: sudo apt install r-base-core

    so, naturally, i ran sudo apt install r-base-core.

    installation took a couple of minutes.

    Later, i needed to install an R package, and realized i needed an R shell for that. running r returned:

    The program 'r' is currently not installed. You can install it by typing: sudo apt install r-cran-littler

    Again, i followed, this time it was quite faster.

    I don't know if these are the correct steps to take (or why they would be wrong), but it's what the system led me to do.

提交回复
热议问题