* org-babel R ascii results: unable to export table
@ 2015-04-30 11:32 Marco Barbàra
2015-04-30 15:45 ` Ista Zahn
0 siblings, 1 reply; 3+ messages in thread
From: Marco Barbàra @ 2015-04-30 11:32 UTC (permalink / raw)
To: emacs-orgmode
Dear org-mode community,
First, I want to apologize for subscribing mainly because I need help.
I recently started using org-mode as a tool for reproducible research
(trying to do R-based literate programming).
What I'm trying to is explained in this example file:
http://orgmode.org/worg/org-contrib/babel/examples/ascii.org
which I downloaded trying to understand how to export R output produced
with the R 'ascii' package.
Running this example, after adding ":exports results" to
"ascii-example3" block, _on the first attempt_, the output was exported
as an odt table (i was happy, this is my desired outcome). But
afterwards, any subsequent attempts to export the same block resulted in
a "verbatim" block, which is the same problem I was trying to solve.
I tried to export as a latex buffer too, and even there i got a verbatim
environment.
I don't think it is bug, it is probably that I still don't understand
org-babel well.
Sorry not to provide any other sample code, but I wouldn't know where
to begin.
Any advice would be very appreciated.
Thank you very much
Marco Barbara
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-babel R ascii results: unable to export table
2015-04-30 11:32 org-babel R ascii results: unable to export table Marco Barbàra
@ 2015-04-30 15:45 ` Ista Zahn
2015-05-04 9:15 ` Marco Barbàra
0 siblings, 1 reply; 3+ messages in thread
From: Ista Zahn @ 2015-04-30 15:45 UTC (permalink / raw)
To: Marco Barbàra; +Cc: emacs-orgmode Mailinglist
Hi Marco,
Here is a fairly minimal example to get you started:
#### Begin Example ####
#+PROPERTY: header-args:R :session *R* :results output drawer :exports both
#+BEGIN_SRC R
library(ascii)
options(asciiType="org")
#+END_SRC
#+BEGIN_SRC R
ascii(mtcars[1:5, 1:5])
#+END_SRC
#+BEGIN_SRC R
ascii(summary(lm(hp ~ wt, data = mtcars)))
#+END_SRC
### End Example
First execute the code blocks with 'M-x org-babel-execute-buffer' then
export. For more control I would refer to the manual section at
http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code
Best,
Ista
On Thu, Apr 30, 2015 at 7:32 AM, Marco Barbàra <jabbba@gmail.com> wrote:
> Dear org-mode community,
>
> First, I want to apologize for subscribing mainly because I need help.
>
> I recently started using org-mode as a tool for reproducible research
> (trying to do R-based literate programming).
>
> What I'm trying to is explained in this example file:
> http://orgmode.org/worg/org-contrib/babel/examples/ascii.org
> which I downloaded trying to understand how to export R output produced
> with the R 'ascii' package.
>
> Running this example, after adding ":exports results" to
> "ascii-example3" block, _on the first attempt_, the output was exported
> as an odt table (i was happy, this is my desired outcome). But
> afterwards, any subsequent attempts to export the same block resulted in
> a "verbatim" block, which is the same problem I was trying to solve.
>
> I tried to export as a latex buffer too, and even there i got a verbatim
> environment.
>
> I don't think it is bug, it is probably that I still don't understand
> org-babel well.
>
> Sorry not to provide any other sample code, but I wouldn't know where
> to begin.
>
> Any advice would be very appreciated.
>
> Thank you very much
>
> Marco Barbara
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-babel R ascii results: unable to export table
2015-04-30 15:45 ` Ista Zahn
@ 2015-05-04 9:15 ` Marco Barbàra
0 siblings, 0 replies; 3+ messages in thread
From: Marco Barbàra @ 2015-05-04 9:15 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
Hi,
sorry for replying so late. Thank you very much, your answer pointed me
in the right direction (I solved with :results output drawer)
Marco.
Il giorno Thu, 30 Apr 2015 11:45:20 -0400
Ista Zahn <istazahn@gmail.com> ha scritto:
> Hi Marco,
>
> Here is a fairly minimal example to get you started:
>
> #### Begin Example ####
>
> #+PROPERTY: header-args:R :session *R* :results output
> drawer :exports both
>
> #+BEGIN_SRC R
> library(ascii)
> options(asciiType="org")
> #+END_SRC
>
> #+BEGIN_SRC R
> ascii(mtcars[1:5, 1:5])
> #+END_SRC
>
> #+BEGIN_SRC R
> ascii(summary(lm(hp ~ wt, data = mtcars)))
> #+END_SRC
>
>
> ### End Example
>
> First execute the code blocks with 'M-x org-babel-execute-buffer' then
> export. For more control I would refer to the manual section at
> http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code
>
> Best,
> Ista
>
> On Thu, Apr 30, 2015 at 7:32 AM, Marco Barbàra <jabbba@gmail.com>
> wrote:
> > Dear org-mode community,
> >
> > First, I want to apologize for subscribing mainly because I need
> > help.
> >
> > I recently started using org-mode as a tool for reproducible
> > research (trying to do R-based literate programming).
> >
> > What I'm trying to is explained in this example file:
> > http://orgmode.org/worg/org-contrib/babel/examples/ascii.org
> > which I downloaded trying to understand how to export R output
> > produced with the R 'ascii' package.
> >
> > Running this example, after adding ":exports results" to
> > "ascii-example3" block, _on the first attempt_, the output was
> > exported as an odt table (i was happy, this is my desired outcome).
> > But afterwards, any subsequent attempts to export the same block
> > resulted in a "verbatim" block, which is the same problem I was
> > trying to solve.
> >
> > I tried to export as a latex buffer too, and even there i got a
> > verbatim environment.
> >
> > I don't think it is bug, it is probably that I still don't
> > understand org-babel well.
> >
> > Sorry not to provide any other sample code, but I wouldn't know
> > where to begin.
> >
> > Any advice would be very appreciated.
> >
> > Thank you very much
> >
> > Marco Barbara
> >
> >
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-04 9:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 11:32 org-babel R ascii results: unable to export table Marco Barbàra
2015-04-30 15:45 ` Ista Zahn
2015-05-04 9:15 ` Marco Barbàra
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).