emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* issue with babel R evaluate session vs external process
@ 2012-02-09 12:54 Thomas Alexander Gerds
  2012-02-15 14:33 ` Eric Schulte
  2012-03-12 20:17 ` Thomas Alexander Gerds
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Alexander Gerds @ 2012-02-09 12:54 UTC (permalink / raw)
  To: emacs-orgmode


still a beginner, and maybe therefore, in my setup (release is: 7.8.03,
emacs 23.2.1) the following occurs

-------------org.snip-----------------------
* here it works: org-ctrl-c-ctrl-c and export

#+begin_src R :results output :exports results
  foo=matrix(1:2)
  foo
#+end_src

#+RESULTS:
:      [,1]
: [1,]    1
: [2,]    2

* here it does not:

#+begin_src R :results output :exports results :session *R*
  foo=matrix(3:8)
  foo
#+end_src

the buffer *R* shows this:

> 'org_babel_R_eoe'
[1] "org_babel_R_eoe"
----------------org.snap------------------

some debugging revealed this:

ELISP> (org-babel-R-evaluate-session "*R*" "foo=matrix(1:2)\nfoo" 'output '("output" "replace") nil nil)
*** Eval error ***  
ELISP> (org-babel-R-evaluate-external-process  "foo=matrix(1:2)\nfoo" 'output '("output" "replace") nil nil)
"     [,1]\n[1,]    1\n[2,]    2\n"

but strange-enough when I try to edebug org-babel-R-evaluate-session, I
 get an error:

Symbol's value as variable is void: edebug-after

can someone explain this? 

thanks!
tomy

-- 
sent from nil

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

* Re: issue with babel R evaluate session vs external process
  2012-02-09 12:54 issue with babel R evaluate session vs external process Thomas Alexander Gerds
@ 2012-02-15 14:33 ` Eric Schulte
  2012-03-12 20:17 ` Thomas Alexander Gerds
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2012-02-15 14:33 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

When executing your example below on my system both code blocks work as
shown below.

#+begin_src R :results output :exports results
  foo=matrix(1:2)
  foo
#+end_src

#+RESULTS:
:      [,1]
: [1,]    1
: [2,]    2

#+begin_src R :results output :exports results :session *R*
  foo=matrix(3:8)
  foo
#+end_src

#+RESULTS:
:      [,1]
: [1,]    3
: [2,]    4
: [3,]    5
: [4,]    6
: [5,]    7
: [6,]    8


If you are not using the latest version of Org-mode (from git) I would
suggesting updating to the Org-mode git HEAD which should hopefully fix
this issue.

Thomas Alexander Gerds <tagteam@sund.ku.dk> writes:

> still a beginner, and maybe therefore, in my setup (release is: 7.8.03,
> emacs 23.2.1) the following occurs
>
> -------------org.snip-----------------------
> * here it works: org-ctrl-c-ctrl-c and export
>
> #+begin_src R :results output :exports results
>   foo=matrix(1:2)
>   foo
> #+end_src
>
> #+RESULTS:
> :      [,1]
> : [1,]    1
> : [2,]    2
>
> * here it does not:
>
> #+begin_src R :results output :exports results :session *R*
>   foo=matrix(3:8)
>   foo
> #+end_src
>
> the buffer *R* shows this:
>
>> 'org_babel_R_eoe'
> [1] "org_babel_R_eoe"
> ----------------org.snap------------------
>
> some debugging revealed this:
>
> ELISP> (org-babel-R-evaluate-session "*R*" "foo=matrix(1:2)\nfoo"
> ELISP> output '("output" "replace") nil nil)
> *** Eval error ***  
> ELISP> (org-babel-R-evaluate-external-process "foo=matrix(1:2)\nfoo"
> ELISP> output '("output" "replace") nil nil)
> "     [,1]\n[1,]    1\n[2,]    2\n"
>
> but strange-enough when I try to edebug org-babel-R-evaluate-session, I
>  get an error:
>
> Symbol's value as variable is void: edebug-after
>
> can someone explain this? 
>
> thanks!
> tomy

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: issue with babel R evaluate session vs external process
  2012-02-09 12:54 issue with babel R evaluate session vs external process Thomas Alexander Gerds
  2012-02-15 14:33 ` Eric Schulte
@ 2012-03-12 20:17 ` Thomas Alexander Gerds
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Alexander Gerds @ 2012-03-12 20:17 UTC (permalink / raw)
  To: emacs-orgmode


finally I found the problem: it was not at all related to org or babel,
but due to a function in my ess-send-input-hook. 

sorry for bothering :)

Thomas Alexander Gerds <tagteam@sund.ku.dk> writes:

> still a beginner, and maybe therefore, in my setup (release is:
> 7.8.03,
> emacs 23.2.1) the following occurs
>
> -------------org.snip-----------------------
> * here it works: org-ctrl-c-ctrl-c and export
>
> #+begin_src R :results output :exports results
>   foo=matrix(1:2)
>   foo
> #+end_src
>
> #+RESULTS:
> :      [,1]
> : [1,]    1
> : [2,]    2
>
> * here it does not:
>
> #+begin_src R :results output :exports results :session *R*
>   foo=matrix(3:8)
>   foo
> #+end_src
>
> the buffer *R* shows this:
>
>> 'org_babel_R_eoe'
> [1] "org_babel_R_eoe"
> ----------------org.snap------------------
>
> some debugging revealed this:
>
> ELISP> (org-babel-R-evaluate-session "*R*" "foo=matrix(1:2)\nfoo"
> output '("output" "replace") nil nil)
> *** Eval error ***  
> ELISP> (org-babel-R-evaluate-external-process "foo=matrix(1:2)\nfoo"
> output '("output" "replace") nil nil)
> "     [,1]\n[1,]    1\n[2,]    2\n"
>
> but strange-enough when I try to edebug org-babel-R-evaluate-session,
> I
>  get an error:
>
> Symbol's value as variable is void: edebug-after
>
> can someone explain this? 
>
> thanks!
> tomy
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

end of thread, other threads:[~2012-03-12 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 12:54 issue with babel R evaluate session vs external process Thomas Alexander Gerds
2012-02-15 14:33 ` Eric Schulte
2012-03-12 20:17 ` Thomas Alexander Gerds

Code repositories for project(s) associated with this 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).