EVOLUTION-MANAGER
Edit File: littler.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Command-line and scripting front-end for R</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for littler {littler}"><tr><td>littler {littler}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Command-line and scripting front-end for R</h2> <h3>Description</h3> <p>The <code>r</code> <em>binary</em> provides a convenient and powerful front-end. By embedding R, it permits four distinct ways to leverage the power of R at the shell prompt: scripting, filename execution, piping and direct expression evaluation. </p> <h3>Details</h3> <p>The <code>r</code> front-end was written with four distinct usage modes in mind. </p> <p>First, it allow to write so-called ‘shebang’ scripts starting with <code>#!/usr/bin/env r</code>. These ‘shebang’ scripts are perfectly suited for automation and execution via e.g. via <code>cron</code>. </p> <p>Second, we can use <code>r somefile.R</code> to quickly execute the name R source file. This is useful as <code>r</code> is both easy to type—and quicker to start that either <code>R</code> itself, or its scripting tool <code>Rscript</code>, while still loading the <code>methods</code> package. </p> <p>Third, <code>r</code> can be used in ‘pipes’ which are very common in Unix. A simple and trivial example is <code>echo 'cat(2+2)' | r</code> illustrating that the standard output of one program can be used as the standard input of another program. </p> <p>Fourth, <code>r</code> can be used as a calculator by supplying expressions after the <code>-e</code> or <code>--eval</code> options. </p> <h3>Value</h3> <p>Common with other shell tools and programs, <code>r</code> returns its exit code where a value of zero indicates success. </p> <h3>Note</h3> <p>On OS X one may have to link the binary to, say, <code>lr</code> instead. As OS X insists that files named <code>R</code> and <code>r</code> are the same, we cannot use the latter. </p> <h3>Author(s)</h3> <p>Jeff Horner and Dirk Eddelbuettel wrote <code>littler</code> from 2006 to today, with contributions from several others. </p> <p>Dirk Eddelbuettel <a href="mailto:edd@debian.org">edd@debian.org</a> is the maintainer. </p> <h3>Examples</h3> <pre> ## Not run: #!/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 ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>littler</em> version 0.3.11 <a href="00Index.html">Index</a>]</div> </body></html>