Open MayaGans opened 4 years ago
Hah, yes indeed there is a bit about that in the introduction on JSON.
If you don't mind, keep reading as this is a recurring "issue" that is encountered repeatedly in the book, there is a solid section on this in a later htmlwidgets-related chapter. Then you can tell me if that should perhaps be placed earlier in the book. :)
And you are correct, I think: it should serialise rowwise but (for legacy reasons I think) it serialises columnwise.
Ah ha! Just got to the section in Chapter 7! Maybe consider a note box with those cute warning icons that you will address data manipulation in a future chapter? Might not be necessary though - I think we can close this issue since it's covered
OMG I love this chapter so much!
I don't know if this is too much for an intro chapter (maybe you can consider adding exercises at the end of some of these chapters?) but I wanted to see how
test
would return in the following exampleMy mental model was that it'd be returned like this:
But really this returns two arrays which we can access using
x.test.COL1
andx.test.COL2
.Again this is just a note, figured I'd share something I explored as a learner as it may be worth including a data structure a user is likely to pass into the widget (but maybe you do that in future chapters 😊 )