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: Rainer M Krug
Subject: Re: [O] Using #+NAME for single value, not table?
Date: Fri, 27 Jun 2014 11:51:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

address@hidden (Thomas S. Dye) writes:

> 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?

Thanks - yes, I could do that, but then it is not equivalent to a table,
as I have to use VARIABLEVALUE() and for a table VARIABLETABLE. I
actually wanted to get rid of this inconsistencies.

I could obviously define an R source code block to return the table
defined before in org, but this is not nice at all...

Cheers,

Rainer

>
> #+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

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      address@hidden

Skype:      RMkrug

PGP: 0x0F52F982

Attachment: pgpeeKAjEvlsZ.pgp
Description: PGP signature


reply via email to

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