From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jude DaShiell Subject: Re: searching for csv utilities Date: Wed, 3 Jun 2015 11:46:12 -0400 (EDT) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Arz-0001kq-8M for emacs-orgmode@gnu.org; Wed, 03 Jun 2015 11:46:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0Art-0000V2-RF for emacs-orgmode@gnu.org; Wed, 03 Jun 2015 11:46:19 -0400 Received: from mailbackend.panix.com ([166.84.1.89]:45819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Art-0000Uh-NS for emacs-orgmode@gnu.org; Wed, 03 Jun 2015 11:46:13 -0400 In-Reply-To: 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: Jonathan Leech-Pepin Cc: Org Mode Mailing List Jonathan, Your modified ecm in this case works. Having applied the ecm to a larger file with seven additional calculation rows in it the averages are now displaying on the sums line. I tried @>-7 at the start of the #+TBLFM: line and that generated about as many errors as someone's first efforts at a Cobol program. I also put a printf format string into that TBLFM: line that rounds averages to two decimal places and also prints out right parens at the end of each result. Is that an emacs-orgmode convention? I think the 2>$2 piece of the #+TBLFM: line tells emacs-orgmode to put that calculation's results on the last line of the file and in column 2. Are these calculations elisp format? If so, I didn't read the elisp section of the spreadsheet info for emacs-orgmode yet. On Tue, 2 Jun 2015, Jonathan Leech-Pepin wrote: > Date: Tue, 2 Jun 2015 08:04:20 > From: Jonathan Leech-Pepin > To: Jude DaShiell > Cc: Org Mode Mailing List > Subject: Re: [O] searching for csv utilities > > Hello, > > On 2 June 2015 at 07:44, Jude DaShiell wrote: > >> | Date | Sys | Dia | Pul | Sugar | >> |------------------+-------------------+-----+-----+-------| >> | [2014-04-27 Sun] | 125 | 88 | 78 | 92 | >> | [2014-04-28 Mon] | 102 | 88 | 86 | 92 | >> | Averages: | =$2=vmean(@<..@>) | | | | >> #+TBLFM: $2=$2=vmean(@<..@>) >> > > The formula in question is the culprit in this case (at least as stated > there). > > : $2=$2=vmean(@<..@>) > > Second column is equal to the second column which is equal to the mean of > all the values in the second column (including the header "Sys"). > > If you change the table as follows: > > | Date | Sys | Dia | Pul | Sugar | > |------------------+-------+-----+-----+-------| > | [2014-04-27 Sun] | 125 | 88 | 78 | 92 | > | [2014-04-28 Mon] | 102 | 88 | 86 | 92 | > |------------------+-------+-----+-----+-------| > | Averages: | 113.5 | 88 | 82 | 92 | > #+TBLFM: @>$2..@>$>=vmean(@I..@II) > > All the values will properly compute. If you want to avoid the second > HLINE above Averages: then change =@II= to =@>>= (penultimate row) > > Regards, > Jon > > >> This is a cut down version of my full record set. Sometimes when I key >> formulas in I get ?ERROR back for a result after keying in c-c+c-c once >> I've completed the formula and hit tab. If I do c-u+c-c+c-c that sometimes >> generated ?ERROR. Other times I key in a formula and the cursor gets >> locked and I have to hit c-g to exit #+TBLFM: mode; I don't know what's >> actually happening when that situation arises since other than suddenly >> finding the cursor locked I can neither tell what state I'm in or if a few >> more keystrokes are needed or if I've generated an error situation. >> >> -- >> >> >> > --