Forrest logo
back to the Rscript tool

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

The command "Rscript" is used to execute R scripts from the command line. In this case, the "--vanilla" option is specified to run R in a simplified mode, without loading any startup profile or user modifications.

The "${filename-R}" is a syntax used in shell scripting, where $ denotes a variable and {} are used to enclose the variable name. In this case, the variable 'filename' is being referenced, with a fallback value of "R" (if the variable doesn't exist). The purpose of this syntax is to execute the R script mentioned in the 'filename' variable.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the Rscript tool