tidymodels / TMwR

Code and content for "Tidy Modeling with R"
https://tmwr.org
Other
602 stars 282 forks source link

Chapter 10.2.1: "R is smart enough" #76

Closed Bijaelo closed 4 years ago

Bijaelo commented 4 years ago

This is somewhat of a suggestion to add a "to see this try doing" in chapter 10.2.1. I fell right into the trap of thinking that the way the data is split one for each fold would be a memory issue. I spend about 20 minutes before reading the line that correctly states "R is smart enough" to not copy the data.frame ( at least before making changes to one of them ).

After reading it however, and knowing I had spent some time going back digging into R's documentation on memory usage, I felt that a small example or "try this" box would've been nice in this section.

One could consider whether it might be illustrative for readers to add a notebox like

:::rmdnote
To see this try executing `pryr::object_size(vfold_cv(ames_train, v = k))` for different values of k.
:::

to make an illustrative example around line 203 in resampling.Rmd

This is of course just a suggestion for consideration, and it may also just be redundant clutter.

juliasilge commented 4 years ago

Thanks so much for this point @Bijaelo! I think a footnote will be perfect for this. 👍

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.