littler Build Status License CRAN Downloads

A scripting and command-line front-end for GNU R permitting use of R in command-line contexts.

So What Does it Do?

#!/usr/bin/env r              ## for use in scripts

other input | r               ## for use in pipes

r somefile.R                  ## for running files

r -e 'expr'                   ## for evaluating expressions

r --help                      ## to show a quick synopsis

See the examples vignette for a full set of introductory examples. Also see the examples/ directory, as well as maybe the older tests directory both of which are installed with the package.


Version 0.3.0 or later

The package resides on the CRAN network and can be installed via


Previous Versions up to 0.2.3

In general, simply running the script bootstrap will configure and build the executable. Running make install (possibly as sudo make install) will install the resulting binary.

On Linux systems, ensure you have the autotools-dev package (or its equivalent on non-Debian/Ubuntu systems). On OS X, you may need to run brew install automake autoconf to get all the tools.

Alternate Naming

On some operating systems such as OS X, r is not different from R. As this risk confusing the main binary R for the R system with our smaller scripting frontend r, we suggest to consider running configure --program-prefix="l" which this leads to installation of a binary lr instead of r.

Alternate R Version

As littler uses autoconf its AC_PATH_PROG() macro to find R, one can simply adjust the PATH when calling configure (or, rather, bootstrap) to have another version of R used. For example, on a server with R-devel in this location, the following builds littler using this R-devel version: PATH="/usr/local/lib/R-devel/bin/:$PATH" ./bootstrap.

More Information

For more information about littler, please see

(but note that the latter now overlaps with the example vignette).


Jeff Horner and Dirk Eddelbuettel


GPL (>= 2)


GNU R的脚本和命令行前端允许使用R 命令行上下文。


#!/usr/bin/env r              ## for use in scripts

other input | r ## for use in pipes

r somefile.R ## for running files

r -e 'expr' ## for evaluating expressions

r help ## to show a quick synopsis

示例小插曲 一整套介绍性的例子。也 看到 examples / directory , 以及也许 较旧的测试目录 这两个都安装在包中。


Version 0.3.0 or later



Previous Versions up to 0.2.3

一般来说,只需运行脚本 bootstrap 即可配置和构建 可执行。运行 make install (可能作为 sudo make install )将会 安装生成的二进制文件。

在Linux系统上,请确保您具有 autotools-dev 包(或其 相当于非Debian / Ubuntu系统)。在OS X上,您可能需要运行 brew install automake autoconf 来获取所有工具。

Alternate Naming

在某些操作系统(如OS X)上, r R 没有区别。如 这个风险使R系统的主要二进制码 R 混淆在一起 脚本化前端 r ,我们建议考虑运行 configure –program-prefix =l,这将导致安装二进制代码 lr 而不是 r

Alternate R Version

由于小程序使用autoconf它的 AC_PATH_PROG()宏来查找 R ,可以 调用 configure (或者, bootstrap )时,调整 PATH 使用另一个版本的R。例如,在R-devel的服务器上 这个位置,以下使用这个R-devel版本构建小程序: PATH =/ usr / local / lib / R-devel / bin /:$ PATH./bootstrap



(但请注意,后者现在与…重叠 示例小插曲)。


Jeff Horner和Dirk Eddelbuettel


GPL(> = 2)