* Inserting a row divider/header into org-babel results
@ 2020-01-14 21:01 sergio ruiz
0 siblings, 0 replies; only message in thread
From: sergio ruiz @ 2020-01-14 21:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1701 bytes --]
Adding a header to the data
===========================
I am presenting some simple data here, but the idea is, I would like
to programatically add a header to the results of an org-babel
evaluation. Looking at the results from `data_table', I would like to
intercept the first line so that I can massage it into the preferred
output. I am just unsure how to insert the header into my output.
My goal is to be able to generate the "Preferred result"
programatically.
Any Ideas?
Thanks!
Latex Test
~~~~~~~~~~
Table test here:
----------------
,----
| rows = (1..5)
| columns = (1..5)
| results = []
| rows.each_with_index do |row|
| result_row = []
| columns.each do |column|
| result_row << column * row
| end
| results << result_row
| end
| results
`----
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Preferred result
----------------
column 1 column 2 column 3 column 4 column 5
--------------------------------------------------
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
----
peace,
sergio
photographer, journalist, visionary
Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
[-- Attachment #1.2: Type: text/html, Size: 6223 bytes --]
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-14 21:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-14 21:01 Inserting a row divider/header into org-babel results sergio ruiz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).