Here there are several uses of 1, 2, and 3 in different roles, e.g. the value of x, the value of a, and y, while also being used as labels for steps 1, 2, and 3 both in the code and in the graphs. This can complicate the parsing of the code and the graphs.
My suggestion is to initiate x with another value, to avoid clashing with the step labels, e.g.
h <- function(x) {
# 1.
a <- 4 # 2.
x + a
}
y <- h(5) # 3.
would change the graph enough so that the binding values are x = 5, a = 4, and y = 9.
In Section 7.4.4 Execution environments, there's:
https://github.com/hadley/adv-r/blob/dc49c3872c3530ac08716fd4f4c235b01266a4ce/Environments.Rmd#L656-L663
Here there are several uses of
1
,2
, and3
in different roles, e.g. the value ofx
, the value ofa
, andy
, while also being used as labels for steps 1, 2, and 3 both in the code and in the graphs. This can complicate the parsing of the code and the graphs.My suggestion is to initiate
x
with another value, to avoid clashing with the step labels, e.g.would change the graph enough so that the binding values are
x = 5
,a = 4
, andy = 9
.