File: ANNOUNCEMENT

package info (click to toggle)
littler 0.1.5-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 596 kB
  • sloc: sh: 3,698; ansic: 497; makefile: 33
file content (122 lines) | stat: -rw-r--r-- 3,314 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

What ?
======

  littler - Provides hash-bang (#!) capability for R (www.r-project.org)


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 GNU 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

		$ ls -l /boot | awk '!/^total/ {print $5}' | \
			 r -e 'fsizes <- as.integer(readLines());
				print(summary(fsizes)); stem(fsizes)'
		   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
		     13     512  110100  486900  768400 4735000
		Loading required package: grDevices

		  The decimal point is 6 digit(s) to the right of the |

		  0 | 00000000000000000011112223
		  0 | 5557778899
		  1 | 112233
		  1 | 5
		  2 |
		  2 |
		  3 |
		  3 |
		  4 |
		  4 | 7		


  And, last but not least, this (somewhat unwieldy) expression can
  be stored in a helper script:

		$ cat examples/fsizes.r
		#!/usr/bin/env r

		fsizes <- as.integer(readLines())
		print(summary(fsizes))
		stem(fsizes)

  (where calling /usr/bin/env is a trick from Python which allows one
  to forget whether r is installed in /usr/bin/r, /usr/local/bin/r,
  ~/bin/r, ...)

  A few examples are provided in the source directories examples/
  and tests/.


Where ?
=======

  littler can either be downloaded from either of 

	  http://biostat.mc.vanderbilt.edu/LittleR

          http://dirk.eddelbuettel.com/code/littler.html

  accessed via SVN using

	  svn checkout http://littler.googlecode.com/svn/trunk/ littler

  or (soon !) be gotten from Debian mirrors via 

	  $ apt-get install littler

  littler is known to build and run on Linux and OS X.


Who ?
=====

  Copyright (C) 2006 Jeffrey Horner and Dirk Eddelbuettel

  littler is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public
  License along with this program; if not, write to the Free
  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

  Comments are welcome, as are are suggestions, bug fixes, or patches.


	- Jeffrey Horner <jeff.horner@vanderbilt.edu>
	- Dirk Eddelbuettel <edd@debian.org>