How to do the following in org-mode
:
- define a constant in the beginning of file, and
- than use it in the text or even compute on it.
Following methods didn't work for me:
Method 1:
#+CONSTANTS: t=10
The temperature is `$t`, and twice of that is `2*$t`.
How to do both of these?
Method 2:
The temperature is src_R{t=10; 2*t}, and twice of that is scr_R{4*t}.
Here value of t
is defined in the first R code block (src_R{t=10; 2*t}
), and the second block (scr_R{4*t}
) is trying to compute on the definition of t
. First block is replaced by 20
as expected, but the second block is not even interpreted as an R code. How can these two be connected?
scr_R
should besrc_R
.