2

For example, in the following table

|------------+------------+-----+-----+-----+-----+-----+-----+-----+-----|
| Pobability |        0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
| Odds       | =B1/(1-B1) |     |     |     |     |     |     |     |     |
| Logit      | =ln(B2)    |     |     |     |     |     |     |     |     |
|------------+------------+-----+-----+-----+-----+-----+-----+-----+-----|

I'd like to automatically fill

  • C2 with =C1/(1-C1), D2 with =D1/(1-D1), etc.
  • C3 with =ln(C2), D3 with =ln(D2), etc.

1 Answer 1

2

The Org mode spreadsheet is not like Excel: you don't create formulas in one cell and then propagate them to other cells (well, you can - do C-h i g (org)Field and range formulas, but propagating them is basically a matter of cutting and pasting). You can instead use a #+TBLFM after the table to do all that:

|------------+------------+------------+-------------+-------------+-----+------------+------------+-----------+-----------|
| Pobability |        0.1 |        0.2 |         0.3 |         0.4 | 0.5 |        0.6 |        0.7 |       0.8 |       0.9 |
| Odds       | 0.11111111 |       0.25 |  0.42857143 |  0.66666667 |  1. |        1.5 |  2.3333333 |        4. |        9. |
| Logit      | -2.1972246 | -1.3862944 | -0.84729786 | -0.40546510 |  0. | 0.40546511 | 0.84729785 | 1.3862944 | 2.1972246 |
|------------+------------+------------+-------------+-------------+-----+------------+------------+-----------+-----------|
#+TBLFM: @2$2..@2$> = @1/(1-@1) :: @3$2..@3$> = ln(@2)

Do C-h i g (org) References RET for the details of how to refer to cells.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.