summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brand <michael.ch.brand@gmail.com>2014-06-01 15:27:07 +0200
committerMichael Brand <michael.ch.brand@gmail.com>2014-06-01 15:27:07 +0200
commit9e09b2d5f62ffcea32194d65127f4b54a6d74440 (patch)
treef28e4d2130afff1b01c73f03c9bcbe783c7172ed
parent8978ca05b2f45b7853c123d19e45215f66f492c5 (diff)
downloadorg-mode-9e09b2d5f62ffcea32194d65127f4b54a6d74440.tar.gz
org.texi: Add f-1 to TBLFM example about nan
* doc/org.texi (Formula syntax for Calc): Add `f-1' to TBLFM example about `nan'.
-rw-r--r--doc/org.texi6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 8b9d54f..14f4596 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2726,9 +2726,11 @@ Operations, , Logical Operations, calc, GNU Emacs Calc Manual}). For example
@item if($1 < 20, teen, string(""))
"teen" if age $1 is less than 20, else the Org table result field is set to
empty with the empty string.
-@item if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E
+@item if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E f-1
Sum of the first two columns. When at least one of the input fields is empty
-the Org table result field is set to empty.
+the Org table result field is set to empty. @samp{E} is required to not
+convert empty fields to 0. @samp{f-1} is an optional Calc format string
+similar to @samp{%.1f} but leaves empty results empty.
@item if(typeof(vmean($1..$7)) == 12, string(""), vmean($1..$7); E
Mean value of a range unless there is any empty field. Every field in the
range that is empty is replaced by @samp{nan} which lets @samp{vmean} result