ed(data=<<see below>>, file=tempfile("ed."), editor="ed", error.expr=<<see below>>)
If errors resulted during the evaluation of the expression containing the editing, the file is retained and calling ed with no arguments will allow re-editing the file. This is typically useful if editing a function definition produced a syntax error.
ttt <- ed(ttt) ttt <- ed(ttt) # now leave a syntax error in the file Syntax error: ... Errors occurred; Use a command like: my.object <- ed() to re-edit this object. ttt <- ed() # after an editing error occurred# example using error.expr ttt <- ed(ttt, error.expr = cat("Type my.object <- ed() again.\n")) # leave another error in file Syntax error: ... # Type my.object <- ed() again. ttt <- ed() # fix the error