From: "Berry, Charles" via "General discussions about Org-mode." <firstname.lastname@example.org>
To: Matt Price <email@example.com>
Cc: Org Mode <firstname.lastname@example.org>
Subject: Re: R session and plotting in x11 window
Date: Sun, 5 Apr 2020 17:19:25 +0000 [thread overview]
Message-ID: <44FD428E-9525-4FE4-88BC-9A906960DD4B@ucsd.edu> (raw)
> On Apr 4, 2020, at 4:27 PM, Matt Price <email@example.com> wrote:
> Does anyone know much about the difference between an R session opened by typing M-x R, and the R session opened by org-babel?
Short answer: almost none.
Long answer: what `org-babel-R-initite-session' and friends do.
> I'm just learning R and my usual method for learning a language is to keep a kind of notebook in org with code snippets they I can execute and iterate on rapidly as I learn. This works great in R when I'm just doing math. When I am working on plots, it would be nice to have them open up quickly either in emacs or in the standard x11 window that R session opened switch M-x R opens up.
> I know I can set the src block headers to produ e a file, but when I'm just iterating rapidly I often switch back and forth between a data output and a graphical output, and typing/erasing those headers is clunky and slow. It would be easier to just paste the plot command into the console and have it pop open the window... But that doesn't seem to work. Anyone know if I can tweak something to make that possible?
I sam really puzzled by this. Do you have an ECM that illustrates this?
Working interactively on my Mac (Quartz - X11 is the device), I routinely do what you describe - usually working from the src edit buffer - and the plots are displayed (and older plots are available via clover-left or some such).
If I had to guess, I'd say that you are opening an R session, but not using it. If you execute a src block, but it does not have a `:session' header, a new instance of R will create a plot file and then exit. If you look in the default directory, you would see `Rplots.pdf' or some such.
The only other thing that comes to mind is that you opened a device that is holding on to all your plots. Try `dev.cur()' in R immediately before and after you create a plot and see what the result is.
next prev parent reply other threads:[~2020-04-05 18:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-04 23:27 R session and plotting in x11 window Matt Price
2020-04-05 17:19 ` Berry, Charles via General discussions about Org-mode. [this message]
2020-04-07 1:26 ` Matt Price
2020-04-07 11:36 ` briangpowell .
2020-04-07 17:37 ` Berry, Charles via General discussions about Org-mode.
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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 public inbox
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).