emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] BUG variable expansion with table


From: Rainer M Krug
Subject: Re: [O] BUG variable expansion with table
Date: Fri, 27 Jun 2014 11:48:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

Andreas Leha <address@hidden> writes:

> Hi Rainer,
>
> Rainer M Krug <address@hidden> writes:
>
>> Hi
>>
>> there seems to be a bug in the table transfer. The org file below
>> evaluates as shown, i.e. the TABLE_BLOCK contains one column less then
>> it should as the first column is discarded and the second one used as
>> the row names. This only occurs when there is a second variable
>> defined. When the second variable is not passed, the code works (see
>> second example below).
>>
>> I did not get far when debugging, only that in the function
>> org-babel-R-assign-elisp when assigning TABLE_FILE the rownames are
>> missing in the =value=.
>>
>> Rainer
>>
>> First example:
>>
>> #+PROPERTY: rownames yes
>> #+PROPERTY: colnames yes
>>
>> #+NAME: TABLE
>> |          | name         | description        |
>> |----------+--------------+--------------------|
>> | annee    | year         | Year of simulation |
>> | id       | ipoints_Qdiv | Point Number       |
>> | iespece  | species      | species number     |
>> | scenario | scenario     | Type of forest     |
>> #+PROPERTY: var TABLE_FILE=TABLE
>> #+PROPERTY: var+ float=123.45
>>
>> * Data Assessment Results
>> #+HEADERS: :var TABLE_BLOCK=TABLE
>> #+HEADERS: :rownames yes
>> #+HEADERS: :colnames yes
>> #+begin_src R :results output wrap
>> TABLE_FILE
>> TABLE_BLOCK
>> #+end_src
>>
>> #+RESULTS:
>> :RESULTS:
>>                  name        description
>> annee            year Year of simulation
>> id       ipoints_Qdiv       Point Number
>> iespece       species     species number
>> scenario     scenario     Type of forest
>>              Year.of.simulation
>> ipoints_Qdiv       Point Number
>> species          species number
>> scenario         Type of forest
>> :END:
>>
>>
>> Second example:
>>
>> #+PROPERTY: rownames yes
>> #+PROPERTY: colnames yes
>>
>> #+NAME: TABLE
>> |          | name         | description        |
>> |----------+--------------+--------------------|
>> | annee    | year         | Year of simulation |
>> | id       | ipoints_Qdiv | Point Number       |
>> | iespece  | species      | species number     |
>> | scenario | scenario     | Type of forest     |
>> #+PROPERTY: var TABLE_FILE=TABLE
>> #+ PROPERTY: var+ float=123.45
>>
>> * Data Assessment Results
>> #+HEADERS: :var TABLE_BLOCK=TABLE
>> #+HEADERS: :rownames yes
>> #+HEADERS: :colnames yes
>> #+begin_src R :results output wrap
>> TABLE_FILE
>> TABLE_BLOCK
>> #+end_src
>>
>> #+RESULTS:
>> :RESULTS:
>>                  name        description
>> annee            year Year of simulation
>> id       ipoints_Qdiv       Point Number
>> iespece       species     species number
>> scenario     scenario     Type of forest
>>                  name        description
>> annee            year Year of simulation
>> id       ipoints_Qdiv       Point Number
>> iespece       species     species number
>> scenario     scenario     Type of forest
>> :END:
>
>
> FWIW, I think that bug was reported some while back [fn:1] --
> unfortunately without a fix .... ;-)

Pity - I will work around it then.

Thanks,

Rainer

>
> - Andreas
>
>
>
> Footnotes:
>
> [fn:1] http://article.gmane.org/gmane.emacs.orgmode/82295/match=
>
>

-- 
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: pgpjhzelg9qlU.pgp
Description: PGP signature


reply via email to

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