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.
Run R scripts with RStudio in Ubuntu The most common way to use R is using RStudio, a great cross-platform open source IDE. You can install it using deb file in Ubuntu. Download the deb file from the link below. You'll have to scroll down a bit to locate the DEB files for Ubuntu.
Rscript is an R Interpreter which helps in the execution of R commands present in the script file. In this tutorial, we will learn basic syntax required to write R Script File and execute R Script File with Rscript command in Terminal / Console.
The main package for R is called r-base
. For the scripting and command-line front-end see littler
(or r-cran-littler
in xenial (16.04LTS) and beyond):
sudo apt-get install littler
Search the ubuntu repositories. Have you checked the littler
package?
The answers posted so far are generally useful, but they don't directly answer the question. I recently had the same question and discovered there is no rscript binary for Ubuntu. The r binary itself is used to execute scripts in batch mode as opposed to the separate rscript binary that I was using in OS X.
It appears you may be able to get an rscript binary from other sources (see http://craig-russell.co.uk/2012/05/08/install-r-on-ubuntu.html#.UwKWzkJdW2Q for example), but I'm not sure why you would need that when simple running "r script.r" from the command line works just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With