Forrest logo
tool overview
On this page you find all important commands for the CLI tool Rscript. If the command you are looking for is missing please ask our AI.

Rscript

Rscript is a command line tool used to run R scripts without launching the R interactive environment. It is available for Windows, macOS, and Linux operating systems.

  1. Rscript allows users to execute R scripts directly from the command line, making it useful for scripting and automation tasks.
  2. It requires the R programming language to be already installed on the system.
  3. Rscript is usually found in the bin directory of the R installation folder.
  4. It provides a way to write self-contained R scripts that can be easily shared and executed by others.
  5. Users can pass command line arguments to Rscript, allowing for dynamic inputs and customizable behavior.
  6. It can be used to execute single R scripts or chain multiple scripts together.
  7. Rscript supports shebang (#!) notation, allowing scripts to be executed directly without specifying the interpreter on Unix-like systems.
  8. It provides a way to execute R scripts from other programming languages, allowing for integration with various software tools.
  9. Rscript has options to control the execution environment, such as the working directory and R options.
  10. It is a powerful tool for running R code in batch mode, making it suitable for data processing, modeling, and analysis tasks.

List of commands for Rscript:

  • rscript:tldr:02830 rscript: Display R version.
    $ Rscript --version
    try on your machine
    explain this command
  • rscript:tldr:509c7 rscript: Execute one or more R expressions.
    $ Rscript -e ${expression1} -e ${expression2}
    try on your machine
    explain this command
  • rscript:tldr:5fd58 rscript: Run a script in vanilla mode (i.e. a blank session that doesn't save the workspace at the end).
    $ Rscript --vanilla ${filename-R}
    try on your machine
    explain this command
  • rscript:tldr:69868 rscript: Run a script.
    $ Rscript ${filename-R}
    try on your machine
    explain this command
tool overview