emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Mario Frasca <mario@anche.no>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: empty/nil in table cells
Date: Fri, 10 Jul 2020 09:15:25 +0200	[thread overview]
Message-ID: <CALn3zoiAshwWznXO8LeZBhhfuNm6yeS7WjxzhNNKCo2SJkqDNw@mail.gmail.com> (raw)
In-Reply-To: <d06a53ae-0a91-d8e0-7a72-d4e7cb75e66e@anche.no>

Hi Mario

For such cases I use ~subseq~ to take the running window out of the
complete range ~@I$2..@II$2~:

|  date | measure | running avg |
|-------+---------+-------------|
| 01-27 |     604 |             |
| 01-28 |     314 |             |
| 01-29 |     636 |             |
| 01-30 |     305 |             |
| 01-31 |     760 |             |
| 02-01 |     531 |             |
| 02-02 |     331 |      497.29 |
| 02-03 |      77 |      422.00 |
| 02-04 |     621 |      465.86 |
| 02-05 |     406 |      433.00 |
| 02-06 |     621 |      478.14 |
| 02-07 |     975 |      508.86 |
| 02-08 |     252 |      469.00 |
| 02-09 |     794 |      535.14 |
| 02-10 |      36 |      529.29 |
#+TBLFM: $3 = '(let ((len 7)) (if (> @# len) (format "%.2f" (/ (apply
#'+ (subseq '(@I$2..@II$2) (- @# 1 len) (- @# 1))) (float len))) ""));
N

Michael


  reply	other threads:[~2020-07-10  7:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 17:08 empty/nil in table cells Mario Frasca
2020-07-09 21:59 ` Nicolas Goaziou
2020-07-09 22:06   ` Mario Frasca
2020-07-10  7:15     ` Michael Brand [this message]
2020-07-10 10:11     ` Nicolas Goaziou
2020-07-10 14:27   ` Mario Frasca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALn3zoiAshwWznXO8LeZBhhfuNm6yeS7WjxzhNNKCo2SJkqDNw@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mario@anche.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).