Reputation: 31
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.
Upvotes: 3
Views: 271
Reputation: 121077
Commands that you type into the console are stored in the history file (see ?savehistory
). You can edit that to get your script.
Upvotes: 4