From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CNvYL+cn42D9tAAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 17:40:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 7oqmK+cn42BrBAAAB5/wlQ (envelope-from ) for ; Mon, 05 Jul 2021 15:40:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 948D3125F1 for ; Mon, 5 Jul 2021 17:40:22 +0200 (CEST) Received: from localhost ([::1]:39294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Qhp-0001AD-Ke for larch@yhetil.org; Mon, 05 Jul 2021 11:40:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0QhH-0001A0-7i for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 11:39:47 -0400 Received: from mail-db8eur05on2108.outbound.protection.outlook.com ([40.107.20.108]:42336 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0QhC-000791-Q1 for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 11:39:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yx6wSHFQUYUrraP4jTTvixpuBgYhbW1/CRLFxwRsgoyG2hpfz/PE2+gHFB5MXwTcQMvMznk9CFgfrDh3LLnAcrYOwySR5AH6sZdK9W6CUwN41bALE4aiLIobexjn4wXdG/gaeiFH/3c+icRcr4axaMWhXKVNqmZGLRGblX+KGXVNmjFKJnLol3Zp8vVhZHjjshfy8eNtogzXU8UzadBAEJhkPr1B+539/FUvAt7L//9oQ6NgW3JCh+wdfDcjicd19uZBI2+hz6C5PJkp7pv6DxJW4ss3OkWWRZhysr2dOH+NO2w+ayGUvmVyS/K/TKoHZ8pSgvR11jwnKgMyVZR55A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jey0YMSex3/hgcjnglmGZRslgYPaNe/zWu4sRjoP67U=; b=FBV+RX65Z81QJF0OgrgNSLy+zXM4Nf/4w7KIj+KC2dpjW6hFcrQaGdJDorOhjViyCYJVCvLSgfJICCPNz6wUBwD1zulsFf1IhvBSzdJD1h8MDIXxpkP3pHLuY+kG1gYzaXKuF6hXX5olydILjCNSGqaYc1dseCrsgCAiAePK7p2IjXLphNLsaOzV8Rgqw99RlOkcTjDvI1fUhKOLfe+zPXlduqUFzfWZ0QqQt9Mt8xljkOmdYUJ/RX3yfom2mDUsGw0/iCT8B2qP2yTd+MU/h9ymTqJEg4N2mekQ1egfLuOpAnsgpMZ36ObR/drS+VV6jieot18JIjRwzUALswCnKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ucl.ac.uk; dmarc=pass action=none header.from=ucl.ac.uk; dkim=pass header.d=ucl.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucl.ac.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jey0YMSex3/hgcjnglmGZRslgYPaNe/zWu4sRjoP67U=; b=hT22r6kqHfolMPHeJTQsKXiXTVwE+TCwfMO36MFXDMwTM5QrQeH8LAs+hxJf15H6A1n9zTYBDxCKyNoYz93twP2DFSm4QnAULHuDOYOy9qI2zG+NXoHLt+3fRE1TRvpg3WwgwloGvA64gzuspkU0/wRokabGRrsK/ZyOk+8u5o8= Received: from PAXPR01MB8415.eurprd01.prod.exchangelabs.com (2603:10a6:102:21e::16) by PR3PR01MB8083.eurprd01.prod.exchangelabs.com (2603:10a6:102:17a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Mon, 5 Jul 2021 15:39:39 +0000 Received: from PAXPR01MB8415.eurprd01.prod.exchangelabs.com ([fe80::49c5:c7a4:70:85f]) by PAXPR01MB8415.eurprd01.prod.exchangelabs.com ([fe80::49c5:c7a4:70:85f%4]) with mapi id 15.20.4287.033; Mon, 5 Jul 2021 15:39:39 +0000 From: Eric S Fraga To: Tim Visher Subject: Re: how to document/comment a complex org table formula Organization: On the Interweb somewhere References: <87h7h9c2nw.fsf@mat.ucm.es> <87zgv0alwt.fsf@ucl.ac.uk> X-Url: http://www.ucl.ac.uk/~ucecesf/ Mail-Followup-To: Org Mode List Date: Mon, 05 Jul 2021 16:39:37 +0100 In-Reply-To: (Tim Visher's message of "Mon, 5 Jul 2021 10:55:10 -0400") Message-ID: <87zgv093d2.fsf@ucl.ac.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [2.29.174.230] X-ClientProxiedBy: LO2P265CA0258.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::30) To PAXPR01MB8415.eurprd01.prod.exchangelabs.com (2603:10a6:102:21e::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from t3610 (2.29.174.230) by LO2P265CA0258.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.21 via Frontend Transport; Mon, 5 Jul 2021 15:39:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1de81dc-6d4e-40be-8851-08d93fcb19ac X-MS-TrafficTypeDiagnostic: PR3PR01MB8083: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B95M+gb1f+uNUkyvddu7Obh+jOiJ6brEI5vHdWlFEVz0RcqQq/Jq2LVD5kW4Pf8RoMDrYntuO1z1hLcJfiybSPb/GpF7JLEtkmKsYNXnQJncE3Dez4zmM+DGJ2yi7ElTC7TveoksS6vyTIZba0dbEWtAYf9rNfIDuUDbVbdoVge7HDZyJRlRk29HaM6y5LXJE/101FOP1FDV/NCHq7utg+ZxjFEc1k74mlbsyCRdbfT2naAb7FELrMGJKv/RrhdbkF3OKCUgjqILKeMMYeQrb8qQRlYtfCgcsv5+y5tDWZESv3Ngh6pinXzgIY69sutbNTzRUb+d2m03LI0rEjchgtUIII3Z36NmLPukuk0x59BDq8pWYIma3wg3t30D//ZfSbYsczC/zN8+VR5qnYOxmYL1sZyERb3Uqa5H9395QnhOwWRM/3B/RnWF8MmRBotI8RPz8IXMBHyeu6oMcP38s7u95teDuV4b8nt8rWOTexPQRdss2ZYQARRQG+aAUKes+SR9KPBBeZ1ZHeb0eE2zIf3VN/tbJKUlV2Xu0GkQDAAT7vmzvGDs1INZo9MOgJDfmTQmmo8EjaB1M/p0rLFzN6VBoUjP8FYSfiIf8rOtJLpkTqSHvbsRC1GsnzOwGTtY5QN1bmQdvJKZN1ybUPnxAy5H5Q65DTv7SrgTN4uuM2MUOnK1WmFCHku4pL3jh/Oqr4EDviHtlcgoNaq3YFJmvA0A1MqX6GspzsGZtB+2qRfemGreL6KkWjaNAb2P3v6O7zpMVeLmaK4aCULIc4L2JQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR01MB8415.eurprd01.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(136003)(39860400002)(66476007)(186003)(66616009)(66946007)(235185007)(38350700002)(52116002)(38100700002)(8676002)(478600001)(83380400001)(16526019)(6496006)(86362001)(36916002)(966005)(4326008)(2906002)(26005)(5660300002)(8936002)(6486002)(316002)(786003)(6916009)(956004)(36756003)(66556008)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RPMojci5Lm/4cMqLiDrBM2VMdhFHAFXD7pgTTWsRkO1aoCehQvVAPW53OSBb?= =?us-ascii?Q?FfAg1ywp627gg0RNKPuK6WnIMrzgk1jyp2uEO5BQ6+3b/DU2nKQG/hu8O5uN?= =?us-ascii?Q?YU7lVKT0tuwXc3nvuAjpM5QQL4ZxMYiOo5/OrcwHk3jnGV/U9cq4FhbP0YSy?= =?us-ascii?Q?tjuxT1uQq2SDb9mxFeVNjHPZkZxpZ5gz9ps7REEUmVTfZTehZc/cT0wv6Zkt?= =?us-ascii?Q?uQT9GE61IAyZLZ331FGSzY7kXJIB+ld2CvtSS9hdicRhpp67G45r2tqIfSMu?= =?us-ascii?Q?Gd3QcVrpLB/8wTCPcZ+KTfzSbhlPlKTFC5L9Oxq9MMnDqm521gV1fJ7Q6+XQ?= =?us-ascii?Q?JcPjEyjckx1apDBUtFiRlYt4lAhq5ghy1YGCgjVnhIDBS9WEi53Ye9GPMidZ?= =?us-ascii?Q?STKnMtwNIE2TsWo4TqyQYyIcrO1ndlB8CbvqbW2doybs5txDiBnMAQrn4DXP?= =?us-ascii?Q?N9Dj2tyuT4YU324W/QBP8okAiO9zGITVNMr7o1QJb4PL+Yi6MhM5FVqaiGgI?= =?us-ascii?Q?cITeGtvzGmadYSh51cIFVrjlZvjHKJopR2DuAi2SzjD3YNKh+3ThIKL9v5Xf?= =?us-ascii?Q?DUG0yacNx5jL5AX14KWa9oj/Kt3j0VXNu+hmuyw8qZ8+m/YtlK2iAJOK6qDx?= =?us-ascii?Q?7CSjcHwbghg8LZB0v/YHLmtHVoOd11q9EwjOzIrGHTvZhZxTWCl1PBiKOQW6?= =?us-ascii?Q?NjG07tKVTAXjtxiCqgRczbWBdwdITzTJ4E8eAyfGP71X0oqCnA7Qf6vlR5gf?= =?us-ascii?Q?hewM2XqRIr+0ZmoY9hpL0jO/znT2UHjhpgOkqC/pV2FzMeBp+Zm8sUmjzU65?= =?us-ascii?Q?ObJCc6Ofiv/ee8bVJo87i/IK4t5DBfJgb9ex7O70ZlVYotp6W3eGL53352mS?= =?us-ascii?Q?MsjJH/TGbQzjVBlduMgkOSkzKAoo6szvMnjdLXQAceP61B+3bP6zlsBCSBXa?= =?us-ascii?Q?/vJUKtrtTV9R4xEhv0OzEk+n4yqAWlhuEOOj4g0MqLsBe6eJQMRQTp3MJmLG?= =?us-ascii?Q?3sg2/tDKihMrtQR19qdjsDuySx0ofvc7wkaoP6K7N8ZsTYt3Fwvb7sDirusW?= =?us-ascii?Q?8zC4sMZ9wS2iLC0+mBJMX8lveFvkMyfHn/Luoo3b8qBRPcTDJbs/tp9ZTsLb?= =?us-ascii?Q?ljTJfqB406viAPB/p5FYOwQuDjvKJtchZEmXMdOza+tG1dblypu0YVlQnmFU?= =?us-ascii?Q?EIqeRHEh5ciDVRX8xyXtfsHNH5hEl8vQwT8KEkoNixiplO0SPAVDOBfDu7AY?= =?us-ascii?Q?H8TNHKQnKZyY/P0ysa8czwEmdA1vJuZCqzr8XB70yV+35T6CvmHWFJVaH0kS?= =?us-ascii?Q?khElybtKYEKggvCM5Li9gQPG?= X-OriginatorOrg: ucl.ac.uk X-MS-Exchange-CrossTenant-Network-Message-Id: c1de81dc-6d4e-40be-8851-08d93fcb19ac X-MS-Exchange-CrossTenant-AuthSource: PAXPR01MB8415.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2021 15:39:39.3136 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1faf88fe-a998-4c5b-93c9-210a11d9a5c2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e/BpWXbSbtBhBXO+NQf2ud+NKAkMGFYY6vsfvPl/OlDGWtkHTYV9FvnmJj/b19WWxC+r95MN/7Rvk69N50PGLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR01MB8083 Received-SPF: pass client-ip=40.107.20.108; envelope-from=e.fraga@ucl.ac.uk; helo=EUR05-DB8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode List Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625499623; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jey0YMSex3/hgcjnglmGZRslgYPaNe/zWu4sRjoP67U=; b=RHDgebhbxmSZr0ftxMKnsbVTEKCEuXNA1P94LnxzM5Rn2q4STKurJoLeDNzR61nPIT21+1 4cbJmHmCyYh2cBTNrM7gKe7VaZX1DdXN2DL4UPKCaqg3Z3/QI7Oc8g6PgUwocQRwX+mzuC s2BxW20TPj/xa/qAAozl0P5eBguA1keNA5fYDd3XK03eDG5TnjbtsY8LVref8ve+ofhvn/ jjGGtNjKbbUJUPhoR3vx/T45x6M3I15R+vFJBqKpFO+fM83dLL1bVuT20UfO5s6+HrBtCr /uUj9vyng504ktw7G7ccuaLSip3XXFZP8z6KPMaU1B8EAKlGhhfxieHTwHGYVQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1625499623; a=rsa-sha256; cv=pass; b=I6VM6ZIOJG0y6PhZC3m1Jm0FEyhEWnSn+LGHoKX1/A7A7rvOKGmTz0B4rTEUO6jlDl54pZ DZZtygUE4q9p52Brsg4bDcMMzC6qRXqOhU66rK/tdU3z9PLCHHahnIVeQl2aLcgepZfV9m atcHL8qblW8FnzKsyWwgL9Ww4xNldYHIkGXbqL3yc9M7eSOg0Ah0KU6iFzsYMdyaCT3puZ rqvp7mMGJhnDs/wuSkVqSfG8zmjVGP5/gWG3+BrWYA4xcToUS9I7yRLI9aa2lt6nN+uxyY Lx6KbIpPkx2IioFHaR446KqvsKGkWaZKCW8OKlXJ8oKKrUyFQ9FfAFrHCom2Gg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=hT22r6kq; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=hT22r6kq; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 948D3125F1 X-Spam-Score: -4.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0iy8F5MTt00a --=-=-= Content-Type: text/plain On Monday, 5 Jul 2021 at 10:55, Tim Visher wrote: > I had never heard of using an org table as input into a source block. > That's really interesting. Attached, for illustration, is a simple example, extracted from a paper I'm currently writing. The "input" to the awk script is the table at the top of the document. The output, two columns of numbers, get converted to an org table, at the bottom of the document, automatically. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-577-gf76d4d : Latest paper written in org: https://arxiv.org/abs/2106.05096 --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename=example.org #+name: values |-----------------------| | 0.006780639787578286 | | 0.006780639787578433 | | 0.008195683980621288 | | 0.006780639787578433 | | 0.006780639787578286 | | 0.006780639787578286 | | 0.008195683980621288 | | 0.006780639787578433 | | 0.006780639787578286 | | 0.0071466305079598775 | | 0.01154503021335327 | | 0.006780639787578433 | | 0.010129986020310415 | | 0.00819568398062114 | | 0.006780639787578433 | | 0.0071466305079598775 | | 0.0071466305079598775 | |-----------------------| The table of values above include cases where rounding errors lead to slightly different results for what are essentially the same result. The following awk script looks at only the significant digits to identify similar results: #+name: frequency #+begin_src awk :stdin values { if ($1 != "hline") { s = substr($1,2,9) n[s] += 1; } } END { for (val in n) { printf "%7.5f %d\n", val, n[val] } } #+end_src #+results: frequency | 0.0082 | 3 | | 0.00678 | 9 | | 0.01013 | 1 | | 0.00715 | 3 | | 0.01154 | 1 | --=-=-=--