Replay a list of evaluated results, as if you'd run them in an R terminal.
Arguments
- x
result from
evaluate()
Examples
f1 <- function() {
cat("1\n")
print("2")
warning("3")
print("4")
message("5")
stop("6")
}
replay(evaluate("f1()"))
#> > f1()
#> 1
#> [1] "2"
#> Warning in f1():
#> 3
#> [1] "4"
#> 5
#> Error in f1():
#> 6
f2 <- function() {
message("Hello")
plot(1:10)
message("Goodbye")
}
replay(evaluate("f2()"))
#> > f2()
#> Hello
#> Goodbye