emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: syntax for remote table/cell references
Date: Mon, 30 Nov 2015 11:36:11 -0500	[thread overview]
Message-ID: <CAN_Dec8Hxto5FCO+hw5m6BFD9sxFiCHAW4OLR2m4r_X+nHCw5Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

Hello everyone,

I'm trying to simulate a simple "COUNT" spreadsheet function with the
following two tables:

 #+TBLNAME: grades
| Student               | Precis  | POV PAPER |
|-----------------------+---------+-----------|
| | A-      | A-        |
| | A       | A-/B+     |
| | A-      | A         |
| | B       | B+        |
| | A-      | B+        |
| | A       | A         |
| | A       | A-        |
| | A-      | B+        |
| | A-      | A-        |
| | A       | A         |
| | A       | A         |
| | B+? A-? | A-        |
| | A-      | B+        |
| | B       | B+        |
| | B+      | A-        |
| | A-      | A-        |
| | A       | B+        |
| | B+      | B         |
| | B+      | B+        |
| | B+      | B         |
| | A       | A-        |


| Grade | Count in Precis | Percent |
|-------+--------+---------|
| A+    | #ERROR |         |
| A     | #ERROR |         |
| A-    | #ERROR |         |
| B+    | #ERROR |         |
| B     | #ERROR |         |
| B-    | #ERROR |         |
| C+    | #ERROR |         |
| C     | #ERROR |         |
| C-    | #ERROR |         |
| F     | #ERROR |         |
 #+TBLFM: $2='(length (org-lookup-all $1 '(remote(grades,$2))));E

Sorry for the ugly formatting.
I want to just count the number of As, A-'s, etc, so I can see how badly
I've messed up my distribution, and how much regrading I need to do.  I
don't understand the syntax for referencing cell ranges in org-lookup-all,
nor do I quite get how "remote" works (doesn't seem to be a normal
function?).  Am trying to follow worg tutorials but not having much luck.

Thanks,
Matt

[-- Attachment #2: Type: text/html, Size: 2278 bytes --]

             reply	other threads:[~2015-11-30 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 16:36 Matt Price [this message]
2015-11-30 19:45 ` syntax for remote table/cell references Thierry Banel

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=CAN_Dec8Hxto5FCO+hw5m6BFD9sxFiCHAW4OLR2m4r_X+nHCw5Q@mail.gmail.com \
    --to=moptop99@gmail.com \
    --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).