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
5 #+STYLE: <style type="text/css">#outline-container-1 { clear:both; }</style>
8 <div id="logo" style="float: left; text-align: center; max-width: 340px; font-size: 8pt; margin-left: 1em;">
10 <img src="../../images/babel/library-of-babel.png" alt="Library of Babel"/>
12 The Library of Babel, by Pierre Clayette
14 <a href="http://downlode.org/Etext/library_of_babel.html">Full text of the Borges short story</a>
22 The Library of Babel is an extensible collection of ready-made and
23 easily-shortcut-callable source-code blocks for handling common
24 tasks. Org-babel comes pre-populated with the source-code blocks
25 located in this file. It is possible to add source-code blocks from
26 any org-mode file to the library by calling =(org-babel-lob-ingest
29 This file is included in worg mainly less for viewing through the
30 web interface, and more for contribution through the worg git
31 repository. If you have code snippets that you think others may
32 find useful please add them to this file and [[file:~/src/worg/worg-git.org::contribute-to-worg][contribute them]] to
35 The raw Org-mode text of this file can be downloaded at
36 [[repofile:contrib/babel/library-of-babel.org][library-of-babel.org]]
41 Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.
43 #+srcname: R-plot(data=R-plot-example-data)
44 #+begin_src R :session *R*
48 #+tblname: R-plot-example-data
55 #+lob: R-plot(data=R-plot-example-data)
57 #+resname: R-plot(data=R-plot-example-data)
62 * Table/Matrix manipulation
64 Elegant lisp code for transposing a matrix.
66 #+tblname: transpose-example
71 #+begin_src emacs-lisp :var table=transpose-example
72 (apply #'mapcar* #'list table)
81 #+srcname: python-identity(a=1)
86 #+srcname: python-add(a=1, b=2)