ditaa evaluation is working (but still requires some more peripheral support)
[org-mode.git] / library-of-babel.org
blobee86fe7135a8c94f11eb6e239611cf870ed1dd6f
1 #+title: The Library of Babel --- off-the-shelf functions for data analysis and plotting using org-babel
2 #+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED
3 #+OPTIONS: H:3 num:nil toc:t
4 #+STARTUP: odd hideblocks
6 [[http://downlode.org/Etext/library_of_babel.html][Full text of the Borges short story]]
8 (setq lob (org-babel-lob-parse-buffer))
9 (setq x (gethash 'plot lob))
10 (hash-table-count lob)
11 (maphash (lambda (key val) (insert key)) lob)
14 * Plotting code
15   Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.
17 #+resname: R-plot-default-data
18 | 0 | 0 |
20 #+srcname: R-plot
21 #+begin_src R :results silent :var data=R-plot-default-data
22 plot(data)
23 #+end_src
25 #+tblname: example-R-plot-data
26 | 1 |  2 |
27 | 2 |  4 |
28 | 3 |  9 |
29 | 4 | 16 |
30 | 5 | 25 |
32 #+lob: R-plot(data=example-R-plot-data)