hadley / adv-r

Advanced R: a book
http://adv-r.hadley.nz
Other
2.36k stars 1.71k forks source link

Parent environments text/diagram mismatch #1534

Closed sharlagelfand closed 5 years ago

sharlagelfand commented 5 years ago

I can't entirely tell if this is an error or me misunderstanding, but in the explanation of parent environments, you say that the parent is a small blue circle with an arrow that points to another environment:

Screen Shot 2019-04-26 at 3 12 09 PM

And state that e2a is the parent of e2b. Based on the code, this makes sense to me.

But in the diagram it looks like e2b (a,b,c) is the parent of e2a (d,e) since the blue circle and arrow are pointing from e2b to e2a.

Edit: Hmm, I really think I'm misunderstanding -- from later in the section, it looks like the environment that the arrow is pointing to is the parent environment, not the environment that it's coming from. Maybe it's the text that's unclear in this case then, and not the diagram.

hadley commented 5 years ago

Did this end up making sense? I think the text and diagram are correct, although they might be a bit to understand.

sharlagelfand commented 5 years ago

i'm still confused! 🙃

it says "the parent is ... a small pale blue circle and arrow that points to another environment". by the diagram, that's the environment on the left with a, b, c, which is e2b, right? but then the text (and the code supports) that actually e2a is the parent of e2b. e2a is the one with the arrow pointing to it, not the one with the arrow that points to another environment?

does my confusion make sense? do i have horrible reading comprehension? 🤷‍♀

hadley commented 5 years ago

e2b is on the left, and contains "a", "b", and "c". Its parent is the small blue circle pointing to e2a on the right (which contains "d" and "e").

I feel like one of us is missing something obvious, or we're using words in different ways?

sharlagelfand commented 5 years ago

i was missing that the parent is the small blue circle with the arrow -- i was thinking that the parent was the environment with the small blue circle and the arrow. the language definitely says that but i was reading around it. thank you!