Repeat a sequence of commands.
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# initial sequence
x <- 1
y <- x + 2
z <- y ** 2
w <- sqrt(y)
# alterations: explicit value
tracker_replay(x = 2)
# alterations: replace the same object
x <- 2
tracker_replay(x)
# alterations: name substitution
v <- 3
tracker_replay(x = v)
# alterations: only some objects; w is not replayed
tracker_replay(output(z), replace(x = 4))
# show all branches created in those replays
tracker$branch
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.