emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: problem with frequency table if it contains strings.
Date: Mon, 18 Jun 2018 12:10:48 +0200	[thread overview]
Message-ID: <87h8m05rrr.fsf@mat.ucm.es> (raw)


Hi

Please consider the following example 

#+BEGIN_SRC emacs-lisp
  (defun in-interval (bounds el)
    (and (>= el (car bounds)) (<= el (cadr bounds))))
#+END_SRC


#+TBLNAME: raw-data
| Test |
|------|
|    0 |
|    1 |
|    2 |
|    3 |
|    4 |
|    5 |
|    6 |
|    7 |
|    8 |
|    9 |
|   NP |
|   NP |
|   NP |

#+TBLNAME: stat-marco
#+ATTR_HTML: :border 2 :rules all :frame border
|    | lower bound | upper bound | frequency |
|----+-------------+-------------+-----------|
| SS |           0 |         4.9 |         8 |
| AP |           5 |         6.9 |         2 |
| NT |           7 |         8.9 |         2 |
| SB |           9 |          10 |         1 |
#+TBLFM: $4='(length (org-lookup-all '($2 $3) '(remote(raw-data,@2$1..@>$1)) nil 'in-interval));N


The result is incorrect this the function also counted the entries NP,
which should have been ignored.


That is a annoying and I would strongly appreciate any
clarification/help

Thanks

Uwe Brauer 

             reply	other threads:[~2018-06-18 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 10:10 Uwe Brauer [this message]
2018-06-19 17:19 ` problem with frequency table if it contains strings Uwe Brauer

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=87h8m05rrr.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /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).