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.
Commands that you type into the console are stored in the history file (see ?savehistory). You can edit that to get your script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With