emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Using #+NAME for single value, not table?


From: Thomas S. Dye
Subject: Re: [O] Using #+NAME for single value, not table?
Date: Thu, 26 Jun 2014 07:13:16 -1000

Aloha Rainer,

Rainer M Krug <address@hidden> writes:

> Hi
>
> I use #+NAME to define some parameters for my analysis, which works
> quite nice for tables. but I would now like to use the same apprioach
> for values, e.g. a single number, but I don't manage. Is this possible?
> For illustration a short example:
>
> *** Species names and iespece codes
> #+NAME: SPECIES
> |         | fullName        | shortName | iespece | IFNName         | color |
> |---------+-----------------+-----------+---------+-----------------+-------|
> | fagus   | Fagus sylvatica | fagus     |       4 | fagus_sylvatica | red   |
> | quercus | Quercus robur   | quercus   |       3 | quercus_robur   | green |
>
> *** Random Number Definition
> Defines random number generator kind, normal.kind and seed (see set.seed help 
> in R for details)
> #+NAME: RNGSEED 
> 13
>
> SPECIES works, but how do I get RNGSEED to be 13?

Perhaps you could wrap it in a source code block?

#+name: rngseed
#+begin_src R
13
#+end_src

#+results: rngseed
: 13

#+header: :var x=rngseed()
#+begin_src R
x + 1
#+end_src

#+results:
: 14

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]