littler provides hash-bang (i.e. script starting with #!/some/path) capability for GNU R, as well as simple command-line and piping use.

Why?

GNU R, a language and environment for statistical computing and graphics, provides a wonderful system for 'programming with data' as well as interactive exploratory analysis, often involving graphs.

Sometimes, however, simple scripts are desired. While R can be used in batch mode, and while so-called 'here' documents can be crafted, a long-standing need for a scripting front-end has often been expressed by the R Community.

littler (pronounced 'little R' and written 'r') aims to fill this need.

It can be used directly on the command-line just like, say, bc(1):

$ echo 'cat(pi^2,"n")' | r 9.869604

Equivalently, commands that are to be evaluated can be given on the command-line

$ r -e 'cat(pi^2, "n")' 9.869604

But unlike bc(1), GNU R has a vast number of statistical functions. For example, we can quickly compute a summary() and show a stem-and-leaf plot for file sizes in a given directory via