emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Calc formula with multi value and format string
@ 2009-06-09 22:07 Michaël Parienti
  2009-06-10  7:07 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Michaël Parienti @ 2009-06-09 22:07 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

I would like to put two computed values (sum and mean) into a cell of
a table. Reading the calc manual I found the following syntax:

|---------+---------------|
|         |         Title |
|---------+---------------|
| Label 1 |             0 |
| Label 2 |             1 |
|---------+---------------|
| Label 3 |             1 |
|---------+---------------|
|         | 0.66666667, 2 |
|---------+---------------|
#+TBLFM: $LR2=vmean(@2..-I),vsum(@2..-I)::

Now I would like to format the meanm, but I don’t know where I should
put the format string. I tried several possibilities without success:

$LR2=vmean(@2..-I);%.2f,vsum(@2..-I)::  displays  0.67,vsum(@2..-I)
$LR2=vmean(@2..-I),vsum(@2..-I);%.2f::  displays  0.00
$LR2=vsum(@2..-I),vmean(@2..-I);%.2f::  displays  2.00 

(I don’t mind which value comes first)


Has anyone any idea to help me? Can I set the org-calc-default-modes
variable for just a table? 


-- 
Michaël P
gpg:        D4C8 F73D A000 71C7 44EF  27E6 8982 4991 7126 3CE3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Calc formula with multi value and format string
  2009-06-09 22:07 Calc formula with multi value and format string Michaël Parienti
@ 2009-06-10  7:07 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-06-10  7:07 UTC (permalink / raw)
  To: Michaël Parienti; +Cc: emacs-orgmode


On Jun 10, 2009, at 12:07 AM, Michaël Parienti wrote:

>
> Hi,
>
> I would like to put two computed values (sum and mean) into a cell of
> a table. Reading the calc manual I found the following syntax:
>
> |---------+---------------|
> |         |         Title |
> |---------+---------------|
> | Label 1 |             0 |
> | Label 2 |             1 |
> |---------+---------------|
> | Label 3 |             1 |
> |---------+---------------|
> |         | 0.66666667, 2 |
> |---------+---------------|
> #+TBLFM: $LR2=vmean(@2..-I),vsum(@2..-I)::
>
> Now I would like to format the meanm, but I don’t know where I should
> put the format string. I tried several possibilities without success:
>
> $LR2=vmean(@2..-I);%.2f,vsum(@2..-I)::  displays  0.67,vsum(@2..-I)
> $LR2=vmean(@2..-I),vsum(@2..-I);%.2f::  displays  0.00
> $LR2=vsum(@2..-I),vmean(@2..-I);%.2f::  displays  2.00
>
> (I don’t mind which value comes first)


|---------+---------|
|         |   Title |
|---------+---------|
| Label 1 |       0 |
| Label 2 |       1 |
|---------+---------|
| Label 3 |       1 |
|---------+---------|
|         | 0.67, 2 |
|---------+---------|
#+TBLFM: $LR2=vmean(@2..-I),vsum(@2..-I);f2


HTH

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-10  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-09 22:07 Calc formula with multi value and format string Michaël Parienti
2009-06-10  7:07 ` Carsten Dominik

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).