emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug][BABEL][R] Headers of the tables are not recognized during the export.
@ 2011-04-04 15:43 Vitalie Spinu
  2011-04-04 17:36 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Vitalie Spinu @ 2011-04-04 15:43 UTC (permalink / raw)
  To: emacs-orgmode


Hello everyone!

Have a file like this:
--------------------------------------------
#+OPTIONS:    H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:t d:(HIDE) tags:not-in-toc
#+BABEL: :exports both :session *R* :cache no

#+TBLNAME: Chuah07
| condition | Mean.offer |
|-----------+------------|
| 1.MMM     |      48.49 |
| 2.MMU     |      42.59 |
| 3.MUM     |      44.87 |
| 4.UMU     |      46.43 |
| 5.UUM     |      44.15 |
| 6.UUU     |      43.80 |
| MAL       |      46.28 |
| UK        |       44.1 |
| All       |      45.29 |


#+begin_src R :var data=Chuah07 :results output
str(data)
#+end_src
--------------------------------------------

If I run html export C-c C-e b, the output like this:

'data.frame':	9 obs. of  2 variables:
 $ V1: chr  "1.MMM" "2.MMU" "3.MUM" "4.UMU" ...
 $ V2: num  48.5 42.6 44.9 46.4 44.1 ...

which means the header is not recognized.

In contrast if I run C-c C-c on the block everything is fine:

#+results
: 'data.frame':	9 obs. of  2 variables:
:  $ condition : chr  "1.MMM" "2.MMU" "3.MUM" "4.UMU" ...
:  $ Mean.offer: num  48.5 42.6 44.9 46.4 44.1 ...


Also if I use :cache yes header. The html export recomputes the block.
Wouldn't it be reasonable to have the exporter take into account the :cache
header?

Thanks,
Vitalie.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug][BABEL][R] Headers of the tables are not recognized during the export.
  2011-04-04 15:43 [Bug][BABEL][R] Headers of the tables are not recognized during the export Vitalie Spinu
@ 2011-04-04 17:36 ` Eric Schulte
  2011-04-05 16:04   ` Vitalie Spinu
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2011-04-04 17:36 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: emacs-orgmode

Vitalie Spinu <spinuvit.list@gmail.com> writes:

> Hello everyone!
>
> Have a file like this:
> --------------------------------------------
> #+OPTIONS:    H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:t d:(HIDE) tags:not-in-toc
> #+BABEL: :exports both :session *R* :cache no
> #+TBLNAME: Chuah07
> | condition | Mean.offer |
> |-----------+------------|
> | 1.MMM     |      48.49 |
> | 2.MMU     |      42.59 |
> | 3.MUM     |      44.87 |
> | 4.UMU     |      46.43 |
> | 5.UUM     |      44.15 |
> | 6.UUU     |      43.80 |
> | MAL       |      46.28 |
> | UK        |       44.1 |
> | All       |      45.29 |
>
>
> #+begin_src R :var data=Chuah07 :results output
> str(data)
> #+end_src
>
> --------------------------------------------
>
> If I run html export C-c C-e b, the output like this:
>
> 'data.frame':	9 obs. of  2 variables:
>  $ V1: chr  "1.MMM" "2.MMU" "3.MUM" "4.UMU" ...
>  $ V2: num  48.5 42.6 44.9 46.4 44.1 ...
>
> which means the header is not recognized.
>
> In contrast if I run C-c C-c on the block everything is fine:
>
> #+results
> : 'data.frame':	9 obs. of  2 variables:
> :  $ condition : chr  "1.MMM" "2.MMU" "3.MUM" "4.UMU" ...
> :  $ Mean.offer: num  48.5 42.6 44.9 46.4 44.1 ...
>

Thanks for catching this, I've just pushed up a fix for this issue.  The
column headers were being lost during the export processing.

>
>
> Also if I use :cache yes header. The html export recomputes the block.
> Wouldn't it be reasonable to have the exporter take into account the :cache
> header?
>

The exporter *does* take into account the :cache header, however, due to
the error above, the values of the inputs to the block of R code were
different on export than on interactive evaluation, so the cache was
invalidated as if the contents of the table had changed.

Cheers -- Eric

>
> Thanks,
> Vitalie.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug][BABEL][R] Headers of the tables are not recognized during the export.
  2011-04-04 17:36 ` Eric Schulte
@ 2011-04-05 16:04   ` Vitalie Spinu
  0 siblings, 0 replies; 3+ messages in thread
From: Vitalie Spinu @ 2011-04-05 16:04 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

"Eric Schulte" <schulte.eric@gmail.com> writes:

>>
>
> Thanks for catching this, I've just pushed up a fix for this issue.  The
> column headers were being lost during the export processing.
>
>>
>>
>> Also if I use :cache yes header. The html export recomputes the block.
>> Wouldn't it be reasonable to have the exporter take into account the :cache
>> header?
>>
>
> The exporter *does* take into account the :cache header, however, due to
> the error above, the values of the inputs to the block of R code were
> different on export than on interactive evaluation, so the cache was
> invalidated as if the contents of the table had changed.

Thanks Eric for your work.
This all org-babel thing is just amassing.

Vitalie.

>
> Cheers -- Eric
>
>>
>> Thanks,
>> Vitalie.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-05 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 15:43 [Bug][BABEL][R] Headers of the tables are not recognized during the export Vitalie Spinu
2011-04-04 17:36 ` Eric Schulte
2011-04-05 16:04   ` Vitalie Spinu

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).