[ESS] [External] Re: Function to copy command to script?
Richard M. Heiberger
rmh @end|ng |rom temp|e@edu
Tue May 19 18:27:12 CEST 2020
Hi Kevin,
I think Stephen is assuming you do a lot of work in the *R* and then want
to recover it into a script.
For that case I wouldn't bother saving the *R* buffer, but would just copy
the relevant lines (including output)
and then save it back into the script file with C-u C-u C-y
(ess-yank-cleaned-commands).
The C-u C-u C-y strips out the prompts and output and pastes just the input
commands.
For the way I read your email, you are looking to copy just a single line
from *R* to something.r.
For that I would just highlight it, then copy and paste.
Rich
On Tue, May 19, 2020 at 12:14 PM Stephen Eglen via ESS-help <
ess-help using r-project.org> wrote:
>
> On Tue, May 19 2020, Kevin Wright via wrote:
>
> > Is there a function to copy an inferior-buffer R command back to the R
> > script and insert it at point?
>
> I'm not sure you get it in a single defun, but you can glue the
> following bits together:
>
> https://ess.r-project.org/Manual/ess.html#Transcript-Mode
>
> so save your *R* buffer as a file.Rout, and then edit that file and run
> ess-transcript-clean-region to remove the output and preserve just the
> R commands you sent.
>
> Stephen
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list