From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: 2 questions on tables Date: Mon, 15 Jul 2013 11:12:57 +0200 Message-ID: <87sizg425i.fsf@med.uni-goettingen.de> References: <871u705ngv.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyeqH-0007Dk-Vi for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 05:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyeqG-00081q-8f for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 05:13:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:58243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyeqG-00081b-2V for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 05:13:12 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UyeqF-0002b2-0I for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 11:13:11 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 11:13:11 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 11:13:11 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Michael, Michael Brand writes: > Hi Andreas > > On Mon, Jul 15, 2013 at 8:47 AM, Andreas Leha > wrote: >> I have two questions concerning tables in orgmode: > > I try to answer your first question: > >> 1. What is the best way to handle missing values? >> I have the problem, that missing values ("") are treated as "0" when they >> appear in a formula. >> Entering ("nil") instead helps a bit, but does not propagate, >> i.e. nil + 1 results in 0. >> Can I do better? > > Is this what you are looking for?: > > | Tomato | | | > | Pear | 3.00 | 6.00 | > #+TBLFM: $3 = if("$2" == "nan", string(""), 2 * $2 +.0); E f-2 > > For "E" see > http://orgmode.org/org.html#Formula-syntax-for-Calc > and for "+.0; f-2" see > http://orgmode.org/worg/org-faq.html#table-float-fraction > > Michael thanks a lot! All three comments (the if() statement, the "E" and the "f-2") of yours are extremely helpful. Question one solved. Cheers, Andreas