1 #+title: The Library of Babel
2 #+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED
3 #+OPTIONS: H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
4 #+STARTUP: odd hideblocks
9 off-the-shelf functions for data analysis and plotting using <a href="org-babel-worg.html">org-babel</a><br/>
10 <a href="http://downlode.org/Etext/library_of_babel.html">Full text of the Borges short story</a>
15 <img src="images/library-of-babel.png" alt="images/tower-of-babel.png" />
17 from <a href="http://www.poetryfoundation.org/harriet/2008/01/random-poetry-02/">poetryfoundation.org</a>
24 The Library of Babel is an extensible collection of ready-made and
25 easily-shortcut-callable source-code blocks for handling common
26 tasks. Org-babel comes pre-populated with the source-code blocks
27 located in this file. It is possible to add source-code blocks from
28 any org-mode file to the library by calling =(org-babel-lob-ingest
34 Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.
36 #+srcname: R-plot(data=R-plot-example-data)
37 #+begin_src R :session *R*
41 #+tblname: R-plot-example-data
48 #+lob: R-plot(data=R-plot-example-data)
50 #+resname: R-plot(data=R-plot-example-data)
55 * Table/Matrix manipulation
57 Elegant lisp code for transposing a matrix.
59 #+tblname: transpose-example
64 #+begin_src emacs-lisp :var table=transpose-example
65 (apply #'mapcar* #'list table)
74 #+srcname: python-identity(a=1)
79 #+srcname: python-add(a=1, b=2)