* run R code block in the background (currently emacs freezes when running code)
@ 2014-04-24 17:09 Xebar Saram
2014-04-25 16:31 ` John Hendy
0 siblings, 1 reply; 2+ messages in thread
From: Xebar Saram @ 2014-04-24 17:09 UTC (permalink / raw)
To: org mode
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
Hi all. how does one send the eval commands to the when running R code
blocks to RSS to the background? currently when i evaluate a long code
block it freezes Emacs until the process is done. here is an example code
block i use:
#+BEGIN_SRC R :session R1 :results output
log.sga.270 <- glm(NSGA ~
IQRfintempmabirth+sinetime+costime+age_centered+age_centered_sq+cig_preg+cig_pre+med_income+p_ospace+gender+prev_400+
diab+hyper+lungd+diab_other+prevpret+as.factor(kess)+as.factor(MRN)+as.factor(edu_group)+as.factor(byob)+parity,data=bd,family=binomial)
summary(log.sga.270)
#+END_SRC
thx so much in advance
Z
[-- Attachment #2: Type: text/html, Size: 783 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: run R code block in the background (currently emacs freezes when running code)
2014-04-24 17:09 run R code block in the background (currently emacs freezes when running code) Xebar Saram
@ 2014-04-25 16:31 ` John Hendy
0 siblings, 0 replies; 2+ messages in thread
From: John Hendy @ 2014-04-25 16:31 UTC (permalink / raw)
To: Xebar Saram; +Cc: org mode
On Thu, Apr 24, 2014 at 12:09 PM, Xebar Saram <zeltakc@gmail.com> wrote:
> Hi all. how does one send the eval commands to the when running R code
> blocks to RSS to the background? currently when i evaluate a long code
> block it freezes Emacs until the process is done. here is an example code
> block i use:
>
> #+BEGIN_SRC R :session R1 :results output
> log.sga.270 <- glm(NSGA ~
> IQRfintempmabirth+sinetime+costime+age_centered+age_centered_sq+cig_preg+cig_pre+med_income+p_ospace+gender+prev_400+
> diab+hyper+lungd+diab_other+prevpret+as.factor(kess)+as.factor(MRN)+as.factor(edu_group)+as.factor(byob)+parity,data=bd,family=binomial)
> summary(log.sga.270)
> #+END_SRC
>
I didn't run this, but have trained machine learning models in the
past which run for a while. You should be able to do C-g to un-freeze
the cursor in Emacs, while the code will still be executed in your R
session. Try doing C-c C-c to start that block, C-g, and then C-x b to
switch to the R1 buffer. You should see that the cursor isn't on a
prompt, which means R is busy, yet you're free to move around in your
org buffer and keep writing or doing whatever you want, even though
the R session is tied up.
Best regards,
John
>
> thx so much in advance
>
> Z
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-25 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 17:09 run R code block in the background (currently emacs freezes when running code) Xebar Saram
2014-04-25 16:31 ` John Hendy
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).