emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] syntax for remote table/cell references


From: Matt Price
Subject: [O] syntax for remote table/cell references
Date: Mon, 30 Nov 2015 11:36:11 -0500

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]