From: John Hendy <jw.hendy@gmail.com>
To: Xebar Saram <zeltakc@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: run R code block in the background (currently emacs freezes when running code)
Date: Fri, 25 Apr 2014 11:31:38 -0500 [thread overview]
Message-ID: <CA+M2ft9Pf9Vqg7_w0g30JpqzvvfH3SkEEUycL1n6xtCt34+qsA@mail.gmail.com> (raw)
In-Reply-To: <CAOQHXPrSNR2J+tmczr-K_3UroNU+QNHwTvgLzhVmocCe3_hs8w@mail.gmail.com>
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
prev parent reply other threads:[~2014-04-25 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+M2ft9Pf9Vqg7_w0g30JpqzvvfH3SkEEUycL1n6xtCt34+qsA@mail.gmail.com \
--to=jw.hendy@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=zeltakc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.