updates to publish information for org-babel-documentation
[org-mode.git] / library-of-babel.org
blob27fce86b6e12e533c84c7cda62498674764fff9b
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
6 #+begin_html 
7   <div id="subtitle">
8     <p>
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>
11     </p>
12   </div>
13   <div id="logo">
14     <p>
15       <img src="images/library-of-babel.png"  alt="images/tower-of-babel.png" />
16       <div id="attr">
17         from <a href="http://www.poetryfoundation.org/harriet/2008/01/random-poetry-02/">poetryfoundation.org</a>
18       </div>
19     </p>  
20   </div>
21 #+end_html
23 * Introduction
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
29   "path/to/file.org")=.
31 * Plotting code
33 ** R
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*
38 plot(data)
39 #+end_src
41 #+tblname: R-plot-example-data
42 | 1 |  2 |
43 | 2 |  4 |
44 | 3 |  9 |
45 | 4 | 16 |
46 | 5 | 25 |
48 #+lob: R-plot(data=R-plot-example-data)
50 #+resname: R-plot(data=R-plot-example-data)
51 : nil
53 ** Gnuplot
55 * Misc
56 #+srcname: python-identity(a=1)
57 #+begin_src python
59 #+end_src
61 #+srcname: python-add(a=1, b=2)
62 #+begin_src python
63 a + b
64 #+end_src