emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* wrap long table formula
@ 2011-10-31 14:01 henry atting
  2011-10-31 14:05 ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: henry atting @ 2011-10-31 14:01 UTC (permalink / raw)
  To: emacs-orgmode

I have a table with 3 columns and 13 rows. Each field of the 3rd
column calculates the average of the preceding rows of the 2nd column.
For this I wrote formulas for 11 of 13 rows which results in a very
long line. 
How can I wrap this line?

henry

-- 
http://literaturlatenight.de

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

* Re: wrap long table formula
  2011-10-31 14:01 wrap long table formula henry atting
@ 2011-10-31 14:05 ` Carsten Dominik
  2011-10-31 14:21   ` henry atting
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2011-10-31 14:05 UTC (permalink / raw)
  To: henry atting; +Cc: emacs-orgmode


On Oct 31, 2011, at 3:01 PM, henry atting wrote:

> I have a table with 3 columns and 13 rows. Each field of the 3rd
> column calculates the average of the preceding rows of the 2nd column.
> For this I wrote formulas for 11 of 13 rows which results in a very
> long line. 
> How can I wrap this line?

You don't.

You can use the equation editor to have a more convenient way to edit the equations.

- Carsten

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

* Re: wrap long table formula
  2011-10-31 14:05 ` Carsten Dominik
@ 2011-10-31 14:21   ` henry atting
  2011-10-31 18:10     ` Samuel Wales
  0 siblings, 1 reply; 10+ messages in thread
From: henry atting @ 2011-10-31 14:21 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Oct 31, 2011, at 3:01 PM, henry atting wrote:
>
>> I have a table with 3 columns and 13 rows. Each field of the 3rd
>> column calculates the average of the preceding rows of the 2nd column.
>> For this I wrote formulas for 11 of 13 rows which results in a very
>> long line. 
>> How can I wrap this line?
>
> You don't.
>
> You can use the equation editor to have a more convenient way to edit the equations.
>
> - Carsten
>

This is great; I did not know the formula editor yet. Thanks.

henry

-- 
http://literaturlatenight.de

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

* Re: wrap long table formula
  2011-10-31 14:21   ` henry atting
@ 2011-10-31 18:10     ` Samuel Wales
  2011-10-31 19:12       ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2011-10-31 18:10 UTC (permalink / raw)
  To: henry atting; +Cc: emacs-orgmode, Carsten Dominik

Would a column formula work?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.

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

* Re: wrap long table formula
  2011-10-31 18:10     ` Samuel Wales
@ 2011-10-31 19:12       ` Carsten Dominik
  2011-11-01  7:17         ` henry atting
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2011-10-31 19:12 UTC (permalink / raw)
  To: Samuel Wales; +Cc: henry atting, emacs-orgmode


On 31.10.2011, at 19:10, Samuel Wales wrote:

> Would a column formula work?

Good idea!  Quite likely it would.

- Carsten

> 
> Samuel
> 
> -- 
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
> ===
> Bigotry against people with serious diseases is still bigotry.

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

* Re: wrap long table formula
  2011-10-31 19:12       ` Carsten Dominik
@ 2011-11-01  7:17         ` henry atting
  2011-11-01  7:29           ` Christian Moe
  0 siblings, 1 reply; 10+ messages in thread
From: henry atting @ 2011-11-01  7:17 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 31.10.2011, at 19:10, Samuel Wales wrote:
>
>> Would a column formula work?
>
> Good idea!  Quite likely it would.
>
> - Carsten
>
>> 
>> Samuel
>> 
>> -- 
>> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>> ===
>> Bigotry against people with serious diseases is still bigotry.

I was thinking of a column formula but have no clue if it's
possible and if so, how.

In this short example the formula's length is no problem but for a
table with 12 rows or more it certainly is; -- and currently it's the
only way I can realize it.

|   |   |
|---+---|
| 2 |   |
| 6 | 4 |
| 7 | 5 |
#+TBLFM: @3$2=vmean(@2$1..@3$1::@4$2=vmean(@2$1..@4$1


henry

-- 
http://literaturlatenight.de

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

* Re: wrap long table formula
  2011-11-01  7:17         ` henry atting
@ 2011-11-01  7:29           ` Christian Moe
  2011-11-01 14:40             ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Moe @ 2011-11-01  7:29 UTC (permalink / raw)
  To: henry atting; +Cc: emacs-orgmode, Carsten Dominik

On 11/1/11 8:17 AM, henry atting wrote:

> I was thinking of a column formula but have no clue if it's
> possible and if so, how.
>
> In this short example the formula's length is no problem but for a
> table with 12 rows or more it certainly is; -- and currently it's the
> only way I can realize it.
>
> |   |   |
> |---+---|
> | 2 |   |
> | 6 | 4 |
> | 7 | 5 |
> #+TBLFM: @3$2=vmean(@2$1..@3$1::@4$2=vmean(@2$1..@4$1


|   |     |
|---+-----|
| 2 |     |
| 6 |   4 |
| 7 |   5 |
| 3 | 4.5 |
| 9 | 5.4 |
#+TBLFM: @3$2..@>$2=vmean(@2$1..@0$1)

hth,
Christian

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

* Re: wrap long table formula
  2011-11-01  7:29           ` Christian Moe
@ 2011-11-01 14:40             ` Nick Dokos
  2011-11-01 18:53               ` henry atting
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2011-11-01 14:40 UTC (permalink / raw)
  To: mail; +Cc: henry atting, nicholas.dokos, emacs-orgmode, Carsten Dominik

Christian Moe <mail@christianmoe.com> wrote:

> On 11/1/11 8:17 AM, henry atting wrote:
> 
> > I was thinking of a column formula but have no clue if it's
> > possible and if so, how.
> >
> > In this short example the formula's length is no problem but for a
> > table with 12 rows or more it certainly is; -- and currently it's the
> > only way I can realize it.
> >
> > |   |   |
> > |---+---|
> > | 2 |   |
> > | 6 | 4 |
> > | 7 | 5 |
> > #+TBLFM: @3$2=vmean(@2$1..@3$1::@4$2=vmean(@2$1..@4$1
> 
> 
> |   |     |
> |---+-----|
> | 2 |     |
> | 6 |   4 |
> | 7 |   5 |
> | 3 | 4.5 |
> | 9 | 5.4 |
> #+TBLFM: @3$2..@>$2=vmean(@2$1..@0$1)
> 

Another common way to deal with an exceptional cell is to use a field
formula for the exceptional cell and a column formula for the rest:
field formulas take precedence:

#+TBLFM: @2$2 = string("") :: $2 = vmean(@2$1..@0$2)

Nick

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

* Re: wrap long table formula
  2011-11-01 14:40             ` Nick Dokos
@ 2011-11-01 18:53               ` henry atting
  2011-11-01 19:13                 ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: henry atting @ 2011-11-01 18:53 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: henry atting, emacs-orgmode, mail, Carsten Dominik

Nick Dokos <nicholas.dokos@hp.com> writes:

> Christian Moe <mail@christianmoe.com> wrote:
>
>> On 11/1/11 8:17 AM, henry atting wrote:
>> 
>> > I was thinking of a column formula but have no clue if it's
>> > possible and if so, how.
>> >
>> > In this short example the formula's length is no problem but for a
>> > table with 12 rows or more it certainly is; -- and currently it's the
>> > only way I can realize it.
>> >
>> > |   |   |
>> > |---+---|
>> > | 2 |   |
>> > | 6 | 4 |
>> > | 7 | 5 |
>> > #+TBLFM: @3$2=vmean(@2$1..@3$1::@4$2=vmean(@2$1..@4$1
>> 
>> 
>> |   |     |
>> |---+-----|
>> | 2 |     |
>> | 6 |   4 |
>> | 7 |   5 |
>> | 3 | 4.5 |
>> | 9 | 5.4 |
>> #+TBLFM: @3$2..@>$2=vmean(@2$1..@0$1)
>> 
>
> Another common way to deal with an exceptional cell is to use a field
> formula for the exceptional cell and a column formula for the rest:
> field formulas take precedence:
>
> #+TBLFM: @2$2 = string("") :: $2 = vmean(@2$1..@0$2)
>
> Nick

Thanks again to all, both solutions are working fine; I could get rid of my
tapeworm formula.

Is there a place where these advanced features are explained more thoroughly?

henry

-- 
http://literaturlatenight.de

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

* Re: wrap long table formula
  2011-11-01 18:53               ` henry atting
@ 2011-11-01 19:13                 ` Nick Dokos
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2011-11-01 19:13 UTC (permalink / raw)
  To: henry atting; +Cc: nicholas.dokos, emacs-orgmode, mail, Carsten Dominik

henry atting <nsmp_02@online.de> wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
> > Christian Moe <mail@christianmoe.com> wrote:
> >
> >> |   |     |
> >> |---+-----|
> >> | 2 |     |
> >> | 6 |   4 |
> >> | 7 |   5 |
> >> | 3 | 4.5 |
> >> | 9 | 5.4 |
> >> #+TBLFM: @3$2..@>$2=vmean(@2$1..@0$1)
> >> 
> >
> > Another common way to deal with an exceptional cell is to use a field
> > formula for the exceptional cell and a column formula for the rest:
> > field formulas take precedence:
> >
> > #+TBLFM: @2$2 = string("") :: $2 = vmean(@2$1..@0$2)
> >

> Thanks again to all, both solutions are working fine; I could get rid of my
> tapeworm formula.
> 
> Is there a place where these advanced features are explained more thoroughly?
> 

All of this is contained in

    (info "(org) The spreadsheet")

but sometimes you have to read the section a few times (and refer back
to it a few more times): in particular

   (info "(org) References")

and

   (info "(org) Field and range formulas")

deserve repeated reading. 

   (info "(org) Column formulas")

describes the field formula trick.

The whole spreadsheet section of the manual could benefit from a list of
well chosen examples (perhaps on Worg, with a pointer from the manual).
But afaict, everything is in the manual.

Nick

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

end of thread, other threads:[~2011-11-01 19:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31 14:01 wrap long table formula henry atting
2011-10-31 14:05 ` Carsten Dominik
2011-10-31 14:21   ` henry atting
2011-10-31 18:10     ` Samuel Wales
2011-10-31 19:12       ` Carsten Dominik
2011-11-01  7:17         ` henry atting
2011-11-01  7:29           ` Christian Moe
2011-11-01 14:40             ` Nick Dokos
2011-11-01 18:53               ` henry atting
2011-11-01 19:13                 ` Nick Dokos

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