[ESS] Function to copy command to script?

Stephen Eglen @je30 @end|ng |rom c@m@@c@uk
Tue May 19 18:05:57 CEST 2020


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



More information about the ESS-help mailing list