* Naming a table produced by a CALL @ 2014-01-24 11:45 Loris Bennett 2014-01-24 13:03 ` Andreas Leha 0 siblings, 1 reply; 8+ messages in thread From: Loris Bennett @ 2014-01-24 11:45 UTC (permalink / raw) To: emacs-orgmode Hi, I have a CALL which produces a table, which just gets the keyword RESULT. I would like to plot the data in the table with R and so would like to refer to the data in the table. It seems I need to need to replace RESULT by NAME in org-babel-results-keyword, but how do I pass the actual name? Cheers, Loris -- This signature is currently under construction. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-24 11:45 Naming a table produced by a CALL Loris Bennett @ 2014-01-24 13:03 ` Andreas Leha 2014-01-24 14:05 ` Loris Bennett 0 siblings, 1 reply; 8+ messages in thread From: Andreas Leha @ 2014-01-24 13:03 UTC (permalink / raw) To: emacs-orgmode "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > Hi, > > I have a CALL which produces a table, which just gets the keyword > RESULT. I would like to plot the data in the table with R and so would > like to refer to the data in the table. > > It seems I need to need to replace RESULT by NAME in > org-babel-results-keyword, but how do I pass the actual name? > > Cheers, > > Loris Make the CALL named: #+name: foo #+call: foo() HTH, Andreas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-24 13:03 ` Andreas Leha @ 2014-01-24 14:05 ` Loris Bennett 2014-01-25 9:44 ` Andreas Leha 0 siblings, 1 reply; 8+ messages in thread From: Loris Bennett @ 2014-01-24 14:05 UTC (permalink / raw) To: emacs-orgmode Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: > "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > >> Hi, >> >> I have a CALL which produces a table, which just gets the keyword >> RESULT. I would like to plot the data in the table with R and so would >> like to refer to the data in the table. >> >> It seems I need to need to replace RESULT by NAME in >> org-babel-results-keyword, but how do I pass the actual name? >> >> Cheers, >> >> Loris > > Make the CALL named: > > #+name: foo > #+call: foo() > > HTH, > Andreas Thanks. In retrospect, that seems quite obvious. Where is this documented and should it be mentioned here: http://orgmode.org/manual/Evaluating-code-blocks.html ? Cheers, Loris -- This signature is currently under construction. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-24 14:05 ` Loris Bennett @ 2014-01-25 9:44 ` Andreas Leha 2014-01-26 17:44 ` Eric Schulte 0 siblings, 1 reply; 8+ messages in thread From: Andreas Leha @ 2014-01-25 9:44 UTC (permalink / raw) To: emacs-orgmode Hi Loris, "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: > >> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >> >>> Hi, >>> >>> I have a CALL which produces a table, which just gets the keyword >>> RESULT. I would like to plot the data in the table with R and so would >>> like to refer to the data in the table. >>> >>> It seems I need to need to replace RESULT by NAME in >>> org-babel-results-keyword, but how do I pass the actual name? >>> >>> Cheers, >>> >>> Loris >> >> Make the CALL named: >> >> #+name: foo >> #+call: foo() >> >> HTH, >> Andreas > > Thanks. In retrospect, that seems quite obvious. Where is this > documented and should it be mentioned here: > > http://orgmode.org/manual/Evaluating-code-blocks.html > This is a 'not-so-old' feature. And I do not know whether it is documented at all. I agree that 'Evaluating code blocks' is where the documentation should go. Regards, Andreas > ? > > Cheers, > > Loris ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-25 9:44 ` Andreas Leha @ 2014-01-26 17:44 ` Eric Schulte 2014-01-27 9:50 ` Loris Bennett 0 siblings, 1 reply; 8+ messages in thread From: Eric Schulte @ 2014-01-26 17:44 UTC (permalink / raw) To: Andreas Leha; +Cc: emacs-orgmode Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: > Hi Loris, > > "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > >> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >> >>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>> >>>> Hi, >>>> >>>> I have a CALL which produces a table, which just gets the keyword >>>> RESULT. I would like to plot the data in the table with R and so would >>>> like to refer to the data in the table. >>>> >>>> It seems I need to need to replace RESULT by NAME in >>>> org-babel-results-keyword, but how do I pass the actual name? >>>> >>>> Cheers, >>>> >>>> Loris >>> >>> Make the CALL named: >>> >>> #+name: foo >>> #+call: foo() >>> >>> HTH, >>> Andreas >> >> Thanks. In retrospect, that seems quite obvious. Where is this >> documented and should it be mentioned here: >> >> http://orgmode.org/manual/Evaluating-code-blocks.html >> > > This is a 'not-so-old' feature. Yes, I believe this was added in the last month or two. > And I do not know whether it is documented at all. I agree that > 'Evaluating code blocks' is where the documentation should go. > I'll happily apply a documentation patch. I don't believe the copyright assignment required for code contributions is required for contributions to the documentation. Best, > > Regards, > Andreas > > >> ? >> >> Cheers, >> >> Loris > > -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-26 17:44 ` Eric Schulte @ 2014-01-27 9:50 ` Loris Bennett 2014-01-27 11:39 ` Andreas Leha 0 siblings, 1 reply; 8+ messages in thread From: Loris Bennett @ 2014-01-27 9:50 UTC (permalink / raw) To: emacs-orgmode Eric Schulte <schulte.eric@gmail.com> writes: > Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: > >> Hi Loris, >> >> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >> >>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >>> >>>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>>> >>>>> Hi, >>>>> >>>>> I have a CALL which produces a table, which just gets the keyword >>>>> RESULT. I would like to plot the data in the table with R and so would >>>>> like to refer to the data in the table. >>>>> >>>>> It seems I need to need to replace RESULT by NAME in >>>>> org-babel-results-keyword, but how do I pass the actual name? >>>>> >>>>> Cheers, >>>>> >>>>> Loris >>>> >>>> Make the CALL named: >>>> >>>> #+name: foo >>>> #+call: foo() >>>> >>>> HTH, >>>> Andreas This seems to break if I then try to reference the results of the call: #+NAME: test #+BEGIN_SRC sh echo a b c echo 1 2 3 echo 4 5 6 #+END_SRC #+NAME: call-test #+CALL: test() :results table :colnames yes #+RESULT: call-test | a | b | c | |---+---+---| | 1 | 2 | 3 | | 4 | 5 | 6 | #+NAME: r-test #+HEADER: :var data=call-test #+HEADER: :colnames yes #+BEGIN_SRC R data #+END_SRC #+RESULT: r-test | x | |-----| | nil | Is it perhaps not clear whether "call-test" refers to the result or the call? Or is my config broken? I'm using version 8.2.5g (8.2.5g-7-gb2dce8-elpaplus). Cheers, Loris >>> Thanks. In retrospect, that seems quite obvious. Where is this >>> documented and should it be mentioned here: >>> >>> http://orgmode.org/manual/Evaluating-code-blocks.html >>> >> >> This is a 'not-so-old' feature. > > Yes, I believe this was added in the last month or two. > >> And I do not know whether it is documented at all. I agree that >> 'Evaluating code blocks' is where the documentation should go. >> > > I'll happily apply a documentation patch. I don't believe the copyright > assignment required for code contributions is required for contributions > to the documentation. > > Best, > >> >> Regards, >> Andreas >> >> >>> ? >>> >>> Cheers, >>> >>> Loris >> >> -- Dr. Loris Bennett (Mr.) ZEDAT, Freie Universität Berlin Email loris.bennett@fu-berlin.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-27 9:50 ` Loris Bennett @ 2014-01-27 11:39 ` Andreas Leha 2014-01-27 13:01 ` Loris Bennett 0 siblings, 1 reply; 8+ messages in thread From: Andreas Leha @ 2014-01-27 11:39 UTC (permalink / raw) To: emacs-orgmode Hi Loris, "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > Eric Schulte <schulte.eric@gmail.com> writes: > >> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >> >>> Hi Loris, >>> >>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>> >>>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >>>> >>>>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>>>> >>>>>> Hi, >>>>>> >>>>>> I have a CALL which produces a table, which just gets the keyword >>>>>> RESULT. I would like to plot the data in the table with R and so would >>>>>> like to refer to the data in the table. >>>>>> >>>>>> It seems I need to need to replace RESULT by NAME in >>>>>> org-babel-results-keyword, but how do I pass the actual name? >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Loris >>>>> >>>>> Make the CALL named: >>>>> >>>>> #+name: foo >>>>> #+call: foo() >>>>> >>>>> HTH, >>>>> Andreas > > This seems to break if I then try to reference the results of the call: > > #+NAME: test > #+BEGIN_SRC sh > echo a b c > echo 1 2 3 > echo 4 5 6 > #+END_SRC > > #+NAME: call-test > #+CALL: test() :results table :colnames yes > #+RESULT: call-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > | 4 | 5 | 6 | > > #+NAME: r-test > #+HEADER: :var data=call-test I'd expect this to be call-test() ^^ But it works for me with both call-test and call-test(). > #+HEADER: :colnames yes > #+BEGIN_SRC R > data > #+END_SRC > > #+RESULT: r-test > | x | > |-----| > | nil | > > Is it perhaps not clear whether "call-test" refers to the result or the > call? Or is my config broken? I'm using version > > 8.2.5g (8.2.5g-7-gb2dce8-elpaplus). > > Cheers, > > Loris > quick test on my setup with Org-mode version 8.2.4 (release_8.2.4-332-g7059d3): --8<---------------cut here---------------start------------->8--- #+NAME: test #+BEGIN_SRC sh echo a b c echo 1 2 3 echo 4 5 6 #+END_SRC #+results: test | a | b | c | | 1 | 2 | 3 | | 4 | 5 | 6 | #+NAME: call-test #+CALL: test() :results table :colnames yes #+results: call-test | a | b | c | |---+---+---| | 1 | 2 | 3 | | 4 | 5 | 6 | #+NAME: r-test #+HEADER: :var data=call-test #+HEADER: :colnames yes #+BEGIN_SRC R data #+END_SRC #+results: r-test | a | b | c | |---+---+---| | 1 | 2 | 3 | | 4 | 5 | 6 | --8<---------------cut here---------------end--------------->8--- Are you sure about your '#+RESULT' ? The default value for org-babel-results-keyword seems to be 'RESULTS' with an 'S'. (I have customized that to be lower case 'results'.) Regards, Andreas >>>> Thanks. In retrospect, that seems quite obvious. Where is this >>>> documented and should it be mentioned here: >>>> >>>> http://orgmode.org/manual/Evaluating-code-blocks.html >>>> >>> >>> This is a 'not-so-old' feature. >> >> Yes, I believe this was added in the last month or two. >> >>> And I do not know whether it is documented at all. I agree that >>> 'Evaluating code blocks' is where the documentation should go. >>> >> >> I'll happily apply a documentation patch. I don't believe the copyright >> assignment required for code contributions is required for contributions >> to the documentation. >> >> Best, >> >>> >>> Regards, >>> Andreas >>> >>> >>>> ? >>>> >>>> Cheers, >>>> >>>> Loris >>> >>> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Naming a table produced by a CALL 2014-01-27 11:39 ` Andreas Leha @ 2014-01-27 13:01 ` Loris Bennett 0 siblings, 0 replies; 8+ messages in thread From: Loris Bennett @ 2014-01-27 13:01 UTC (permalink / raw) To: emacs-orgmode Hi Andreas, Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: > Hi Loris, > > "Loris Bennett" <loris.bennett@fu-berlin.de> writes: > >> Eric Schulte <schulte.eric@gmail.com> writes: >> >>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >>> >>>> Hi Loris, >>>> >>>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>>> >>>>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes: >>>>> >>>>>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I have a CALL which produces a table, which just gets the keyword >>>>>>> RESULT. I would like to plot the data in the table with R and so would >>>>>>> like to refer to the data in the table. >>>>>>> >>>>>>> It seems I need to need to replace RESULT by NAME in >>>>>>> org-babel-results-keyword, but how do I pass the actual name? >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Loris >>>>>> >>>>>> Make the CALL named: >>>>>> >>>>>> #+name: foo >>>>>> #+call: foo() >>>>>> >>>>>> HTH, >>>>>> Andreas >> >> This seems to break if I then try to reference the results of the call: >> >> #+NAME: test >> #+BEGIN_SRC sh >> echo a b c >> echo 1 2 3 >> echo 4 5 6 >> #+END_SRC >> >> #+NAME: call-test >> #+CALL: test() :results table :colnames yes >> #+RESULT: call-test >> | a | b | c | >> |---+---+---| >> | 1 | 2 | 3 | >> | 4 | 5 | 6 | >> >> #+NAME: r-test >> #+HEADER: :var data=call-test > > I'd expect this to be call-test() > ^^ > But it works for me with both call-test and call-test(). > >> #+HEADER: :colnames yes >> #+BEGIN_SRC R >> data >> #+END_SRC >> >> #+RESULT: r-test >> | x | >> |-----| >> | nil | >> >> Is it perhaps not clear whether "call-test" refers to the result or the >> call? Or is my config broken? I'm using version >> >> 8.2.5g (8.2.5g-7-gb2dce8-elpaplus). >> >> Cheers, >> >> Loris >> > > quick test on my setup with Org-mode version 8.2.4 (release_8.2.4-332-g7059d3): > > #+NAME: test > #+BEGIN_SRC sh > echo a b c > echo 1 2 3 > echo 4 5 6 > #+END_SRC > > #+results: test > | a | b | c | > | 1 | 2 | 3 | > | 4 | 5 | 6 | > > #+NAME: call-test > #+CALL: test() :results table :colnames yes > > #+results: call-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > | 4 | 5 | 6 | > > > #+NAME: r-test > #+HEADER: :var data=call-test > #+HEADER: :colnames yes > #+BEGIN_SRC R > data > #+END_SRC > > #+results: r-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > | 4 | 5 | 6 | > > Are you sure about your '#+RESULT' ? > > The default value for org-babel-results-keyword seems to be 'RESULTS' > with an 'S'. > > (I have customized that to be lower case 'results'.) Yes, thanks, you're right. I must have set that to RESULT by accident after having changed it. That has fixed another problem I was having, namely the result block was not being replaced on re-evaluation of the block, but a new one was created instead. However, I've still got the original problem that the #+RESULTS: r-test | x | |-----| | nil | whether I do #+HEADER: :var data=call-test or #+HEADER: :var data=call-test() If I comment out the line #+NAME: call-test it works and I get #+RESULTS: r-test | a | b | c | |---+---+---| | 1 | 2 | 3 | | 4 | 5 | 6 | So I guess my config must be borked in some other way as well. Cheers, Loris > Regards, > Andreas > > > > > >>>>> Thanks. In retrospect, that seems quite obvious. Where is this >>>>> documented and should it be mentioned here: >>>>> >>>>> http://orgmode.org/manual/Evaluating-code-blocks.html >>>>> >>>> >>>> This is a 'not-so-old' feature. >>> >>> Yes, I believe this was added in the last month or two. >>> >>>> And I do not know whether it is documented at all. I agree that >>>> 'Evaluating code blocks' is where the documentation should go. >>>> >>> >>> I'll happily apply a documentation patch. I don't believe the copyright >>> assignment required for code contributions is required for contributions >>> to the documentation. >>> >>> Best, >>> >>>> >>>> Regards, >>>> Andreas >>>> >>>> >>>>> ? >>>>> >>>>> Cheers, >>>>> >>>>> Loris >>>> >>>> > > > -- This signature is currently under construction. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-27 13:01 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-24 11:45 Naming a table produced by a CALL Loris Bennett 2014-01-24 13:03 ` Andreas Leha 2014-01-24 14:05 ` Loris Bennett 2014-01-25 9:44 ` Andreas Leha 2014-01-26 17:44 ` Eric Schulte 2014-01-27 9:50 ` Loris Bennett 2014-01-27 11:39 ` Andreas Leha 2014-01-27 13:01 ` Loris Bennett
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).