Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Testing - results
- #+name: test
- #+begin_src sh :exports results
- uptime
- #+end_src
- #+RESULTS:
- | 15:49:23 up 2:00 | 2 users | load average: 0.00 | 0.0 | 0.0 |
- * Testing - both
- #+name: test
- #+begin_src sh :exports both
- uptime
- #+end_src
- #+RESULTS:
- | 15:50:02 up 2:01 | 2 users | load average: 0.00 | 0.0 | 0.0 |
- 1 Testing - results
- --------------------
- 15:49:23 up 2:00 2 users load average: 0.00 0.0 0.0
- 2 Testing - both
- -----------------
- uptime
- 15:50:02 up 2:01 2 users load average: 0.00 0.0 0.0
- ** Participants:
- #+NAME: mytable
- | Name | Points |
- |-------+--------|
- | Alice | 30 |
- | Bob | 20 |
- | Carol | 25 |
- | Dan | 18 |
- ** Summary data:
- #+BEGIN_SRC emacs-lisp :cache yes :var data=mytable :exports results
- (let* ((scores (mapcar (lambda (row) (cadr row)) data))
- (sum (apply '+ scores))
- (avg (/ sum (length scores))))
- (list '("Total Score" "Average Score")
- 'hline
- (list sum avg)))
- #+END_SRC
- #+RESULTS[a15af1d9cd34a76f4a6f822c36eccbc8bd493195]:
- | Total Score | Average Score |
- |-------------+---------------|
- | 93 | 23 |
Add Comment
Please, Sign In to add comment