Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create script from console input in R

Tags:

r

statistics

Instead of first creating a script in R and then executing it afterwards, is it possible to do it the other way around?

I.e. I would type some user input in the console, and afterwards have R compile all the user inputs from the console (without the resulting outputs), to a script for later user.

like image 650
user1059974 Avatar asked May 12 '26 20:05

user1059974


1 Answers

Commands that you type into the console are stored in the history file (see ?savehistory). You can edit that to get your script.

like image 92
Richie Cotton Avatar answered May 15 '26 10:05

Richie Cotton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!