hadley / r4ds

R for data science: a book
http://r4ds.hadley.nz
Other
4.51k stars 4.19k forks source link

Figure 5.7 doesn't seem right. #1616

Open zengzhiyu opened 8 months ago

zengzhiyu commented 8 months ago

Figure 5.7 doesn't seem right.

mine-cetinkaya-rundel commented 8 months ago

For reference, here is the figure: https://r4ds.hadley.nz/data-tidy#fig-pivot-names-and-values.

Could you elaborate on what doesn't seem right about it?

zengzhiyu commented 8 months ago

thanks, hope my understanding is correct. the value is 1~8, so they should be under x, y after transformation. and the 1,2 from x1, x2, y1, y2, should be under the column x, y after transformation.