* Using #+NAME for single value, not table?
@ 2014-06-26 12:27 Rainer M Krug
2014-06-26 17:13 ` Thomas S. Dye
2014-06-27 17:38 ` Aaron Ecay
0 siblings, 2 replies; 8+ messages in thread
From: Rainer M Krug @ 2014-06-26 12:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
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:
--8<---------------cut here---------------start------------->8---
*** 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
--8<---------------cut here---------------end--------------->8---
SPECIES works, but how do I get RNGSEED to be 13?
Thanks,
Rainer
--
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: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-26 12:27 Using #+NAME for single value, not table? Rainer M Krug
@ 2014-06-26 17:13 ` Thomas S. Dye
2014-06-27 9:51 ` Rainer M Krug
2014-06-27 17:38 ` Aaron Ecay
1 sibling, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2014-06-26 17:13 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
Aloha Rainer,
Rainer M Krug <Rainer@krugs.de> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-26 17:13 ` Thomas S. Dye
@ 2014-06-27 9:51 ` Rainer M Krug
2014-06-27 15:10 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: Rainer M Krug @ 2014-06-27 9:51 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2016 bytes --]
tsd@tsdye.com (Thomas S. Dye) writes:
> Aloha Rainer,
>
> Rainer M Krug <Rainer@krugs.de> 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: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-27 9:51 ` Rainer M Krug
@ 2014-06-27 15:10 ` Nick Dokos
0 siblings, 0 replies; 8+ messages in thread
From: Nick Dokos @ 2014-06-27 15:10 UTC (permalink / raw)
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> 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...
>
Does :results table help?
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-26 12:27 Using #+NAME for single value, not table? Rainer M Krug
2014-06-26 17:13 ` Thomas S. Dye
@ 2014-06-27 17:38 ` Aaron Ecay
2014-06-27 18:35 ` Grant Rettke
2014-06-30 7:03 ` Rainer M Krug
1 sibling, 2 replies; 8+ messages in thread
From: Aaron Ecay @ 2014-06-27 17:38 UTC (permalink / raw)
To: Rainer M Krug, emacs-orgmode
Hi Rainer,
2014ko ekainak 26an, Rainer M Krug-ek idatzi zuen:
>
> 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:
>
> --8<---------------cut here---------------start------------->8---
> *** 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
> --8<---------------cut here---------------end--------------->8---
>
> SPECIES works, but how do I get RNGSEED to be 13?
You can use a verbatim block:
,----
| #+name: xyz
| : hi
|
| #+begin_src emacs-lisp :var abc=xyz
| (concat "*" abc "*")
| #+end_src
|
| #+RESULTS:
| : *hi*
`----
HTH,
--
Aaron Ecay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-27 17:38 ` Aaron Ecay
@ 2014-06-27 18:35 ` Grant Rettke
2014-06-30 7:03 ` Rainer M Krug
1 sibling, 0 replies; 8+ messages in thread
From: Grant Rettke @ 2014-06-27 18:35 UTC (permalink / raw)
To: Rainer M Krug, emacs-orgmode@gnu.org
On Fri, Jun 27, 2014 at 12:38 PM, Aaron Ecay <aaronecay@gmail.com> wrote:
> You can use a verbatim block:
>
> ,----
> | #+name: xyz
> | : hi
> |
> | #+begin_src emacs-lisp :var abc=xyz
> | (concat "*" abc "*")
> | #+end_src
> |
> | #+RESULTS:
> | : *hi*
> `----
Is that similar to (setq xyz "hi")?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-27 17:38 ` Aaron Ecay
2014-06-27 18:35 ` Grant Rettke
@ 2014-06-30 7:03 ` Rainer M Krug
2014-07-25 14:48 ` Sebastien Vauban
1 sibling, 1 reply; 8+ messages in thread
From: Rainer M Krug @ 2014-06-30 7:03 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
Aaron Ecay <aaronecay@gmail.com> writes:
> Hi Rainer,
>
> 2014ko ekainak 26an, Rainer M Krug-ek idatzi zuen:
>>
>> 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:
>>
>> --8<---------------cut here---------------start------------->8---
>> *** 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
>> --8<---------------cut here---------------end--------------->8---
>>
>> SPECIES works, but how do I get RNGSEED to be 13?
>
> You can use a verbatim block:
>
> ,----
> | #+name: xyz
> | : hi
> |
> | #+begin_src emacs-lisp :var abc=xyz
> | (concat "*" abc "*")
> | #+end_src
> |
> | #+RESULTS:
> | : *hi*
> `----
Perfect - this is exactly what I was looking for.
Thanks,
Rainer
>
> HTH,
--
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: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Using #+NAME for single value, not table?
2014-06-30 7:03 ` Rainer M Krug
@ 2014-07-25 14:48 ` Sebastien Vauban
0 siblings, 0 replies; 8+ messages in thread
From: Sebastien Vauban @ 2014-07-25 14:48 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Rainer M Krug wrote:
> Aaron Ecay <aaronecay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> 2014ko ekainak 26an, Rainer M Krug-ek idatzi zuen:
>>>
>>> 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:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> *** 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
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> SPECIES works, but how do I get RNGSEED to be 13?
>>
>> You can use a verbatim block:
>>
>> ,----
>> | #+name: xyz
>> | : hi
>> |
>> | #+begin_src emacs-lisp :var abc=xyz
>> | (concat "*" abc "*")
>> | #+end_src
>> |
>> | #+RESULTS:
>> | : *hi*
>> `----
>
> Perfect - this is exactly what I was looking for.
If I'm not mistaken, I see two solutions for you:
#+name: RNGSEED
: 13
or
#+PROPERTY: var RNGSEED=13
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-25 14:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 12:27 Using #+NAME for single value, not table? Rainer M Krug
2014-06-26 17:13 ` Thomas S. Dye
2014-06-27 9:51 ` Rainer M Krug
2014-06-27 15:10 ` Nick Dokos
2014-06-27 17:38 ` Aaron Ecay
2014-06-27 18:35 ` Grant Rettke
2014-06-30 7:03 ` Rainer M Krug
2014-07-25 14:48 ` Sebastien Vauban
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).