emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: BUG variable expansion with table
Date: Fri, 27 Jun 2014 00:25:59 +0100	[thread overview]
Message-ID: <olu61jnqmm0.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: m2egyckblz.fsf@krugs.de

Hi Rainer,

Rainer M Krug <Rainer@krugs.de> 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 .... ;-)

- Andreas



Footnotes:

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

  reply	other threads:[~2014-06-26 23:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 19:55 BUG variable expansion with table Rainer M Krug
2014-06-26 23:25 ` Andreas Leha [this message]
2014-06-27  9:48   ` Rainer M Krug
2014-07-28 15:46 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=olu61jnqmm0.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).