R(1)

R1

A language for data analysis and graphics

Usage

R [options] [< infile] [> outfile]

R CMD command [arguments]

Overview

Start R, a system for statistical computation and graphics, with the specified options, or invoke an R tool via the 'R CMD' interface.

R is a language which bears a passing resemblance to the S language developed at AT&T Bell Laboratories. It provides support for a variety of statistical and graphical analyses. R is a true computer language which contains a number of control-flow constructions for iteration and alternation. It allows users to add additional functionality by defining new functions.

On systems which have the GNU readline(3) library, R will maintain a command history, so that commands can be recalled, edited and re-executed.

Options

Most options control what happens at the beginning and at the end of an R session, in particular which files are being read and written, and how much memory is reserved for the R process.

-h, --help

Print short help message and exit

--version

Print version info and exit

--encoding=ENC

Specify encoding to be used for stdin

--encoding ENC

RHOME

Print path to R home directory and exit

--save

Do save workspace at the end of the session

--no-save

Don't save it

--no-environ

Don't read the site and user environment files

--no-site-file

Don't read the site-wide Rprofile

--no-init-file

Don't read the user R profile

--restore

Do restore previously saved objects at startup

--no-restore-data

Don't restore previously saved objects

--no-restore-history

Don't restore the R history file

--no-restore

Don't restore anything

--vanilla

Combine --no-save, --no-restore, --no-site-file, --no-init-file and --no-environ

--no-readline

Don't use readline for command-line editing

--max-connections=N

Set max number of connections to N

--max-ppsize=N

Set max size of protect stack to N

--min-nsize=N

Set min number of fixed size obj's ("cons cells") to N

--min-vsize=N

Set vector heap minimum to N bytes; '4M' = 4 MegaB

-q, --quiet

Don't print startup message

--silent

Same as --quiet

-s, --no-echo

Make R run as quietly as possible

--interactive

Force an interactive session

--verbose

Print more information about progress

-d, --debugger=NAME

Run R through debugger NAME

--debugger-args=ARGS

Pass ARGS as arguments to the debugger

-g TYPE, --gui=TYPE

Use TYPE as GUI; possible values are 'X11' (default) and 'Tk'.

--arch=NAME

Specify a sub-architecture

--args

Skip the rest of the command line

-f FILE, --file=FILE

Take input from 'FILE'

-e EXPR

Execute 'EXPR' and exit

FILE may contain spaces but not shell metacharacters.

Commands:

BATCH

Run R in batch mode

COMPILE

Compile files for use with R

SHLIB

Build shared library for dynamic loading

INSTALL

Install add-on packages

REMOVE

Remove add-on packages

build

Build add-on packages

check

Check add-on packages

LINK

Front-end for creating executable programs

Rprof

Post-process R profiling files

Rdconv

Convert Rd format to various other formats

Rd2pdf

Convert Rd format to PDF

Rd2txt

Convert Rd format to pretty text

Stangle

Extract S/R code from Sweave documentation

Sweave

Process Sweave documentation

Rdiff

Diff R output ignoring headers etc

config

Obtain configuration information about R

javareconf

Update the Java configuration variables

rtags

Create Emacs-style tag files from C, R, and Rd files

Please use 'R CMD command --help' to obtain further information about the usage of 'command'.

Options --arch, --no-environ, --no-init-file, --no-site-file and --vanilla can be placed between R and CMD, to apply to R processes run by 'command'

Releases

16 releases since Debian 2.0 (Hamm); the text changed 15 times.

  1. 2.0
  2. 2.1
  3. 2.2
  4. 3.0
  5. 3.1
  6. 4.0
  7. 5.0
  8. 6.0
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. Arch

--arch since Debian 4.0 (Etch); --args since Debian 3.1 (Sarge); --debugger since Debian 2.1 (Slink); --debugger-args since Debian 3.1 (Sarge); --encoding since Debian 3.1 (Sarge); --file since Debian 5.0 (Lenny); --gui since Debian 3.0 (Woody); --help since Debian 2.1 (Slink); --interactive since Debian 5.0 (Lenny); --max-connections since Debian 13 (Trixie); --max-ppsize since Debian 3.1 (Sarge); --min-nsize since Debian 9 (Stretch); --min-vsize since Debian 9 (Stretch); --no-echo since Debian 11 (Bullseye); --no-environ since Debian 3.0 (Woody); --no-init-file since Debian 2.1 (Slink); --no-readline since Debian 2.1 (Slink); --no-restore since Debian 2.1 (Slink); --no-restore-data since Debian 3.0 (Woody); --no-restore-history since Debian 3.0 (Woody); --no-save since Debian 2.1 (Slink); --no-site-file since Debian 2.1 (Slink); --quiet since Debian 2.1 (Slink); --restore since Debian 2.1 (Slink); --save since Debian 2.1 (Slink); --silent since Debian 2.2 (Potato); --vanilla since Debian 3.0 (Woody); --verbose since Debian 2.2 (Potato); --version since Debian 2.1 (Slink); -d since Debian 3.0 (Woody); -e since Debian 6.0 (Squeeze); -f since Debian 5.0 (Lenny); -g since Debian 3.0 (Woody); -h since Debian 3.0 (Woody); -q since Debian 3.0 (Woody); -s since Debian 11 (Bullseye).

--max-nsize until Debian 6.0 (Squeeze); --max-vsize until Debian 6.0 (Squeeze); --nsize until Debian 2.2 (Potato); --slave until Debian 10 (Buster); --vsize until Debian 2.2 (Potato); -gdb until Debian 2.0 (Hamm); -n until Debian 2.1 (Slink); -noreadline until Debian 2.0 (Hamm); -norestore until Debian 2.0 (Hamm); -nosave until Debian 2.0 (Hamm); -quiet until Debian 2.0 (Hamm); -restore until Debian 2.0 (Hamm); -save until Debian 2.0 (Hamm); -v until Debian 2.1 (Slink); -xxgdb until Debian 2.0 (Hamm).

Reporting bugs

Report bugs at <https://bugs.R-project.org>.

From r 4.6.2-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.