Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Broken Ch 10 #374

Closed
biscotty666 opened this issue May 16, 2024 · 5 comments
Closed

Code Broken Ch 10 #374

biscotty666 opened this issue May 16, 2024 · 5 comments

Comments

@biscotty666
Copy link

In 10.1, estimate_perf(lm_fit, ames_train) fails with

! Can't subset columns that don't exist.
✖ Columns `Gr_Liv_Area`, `Bldg_Type_TwoFmCon`, `Bldg_Type_Duplex`, `Bldg_Type_Twnhs`, and `Bldg_Type_TwnhsE` don't exist.

Running the code in 8.8 solves the problem.

Thank you for the wonderful book.

@davidrsch
Copy link

davidrsch commented May 16, 2024

It doesn't fail per se, because as stated previously to the example:

"Let’s again use the Ames housing data to demonstrate these concepts. Section 8.8 summarizes the current state of our Ames analysis."

It is using the data resulting from Section 8.8.

And when rendering the chapter, it's ensure that this data will be available when calling in the source code:

source("ames_snippets.R")
load("RData/lm_fit.RData")

@biscotty666
Copy link
Author

biscotty666 commented May 16, 2024 via email

@juliasilge
Copy link
Member

Thanks, @biscotty666 and @davidrsch! We don't consider this broken code but in fact as designed. Throughout the book, there are summaries at the end of the chapters of where we are in the analysis and then we refer to them in later chapters, like @davidrsch pointed out. There would be too much repeated code otherwise for the reader, in our option.

Thanks again!

@biscotty666
Copy link
Author

biscotty666 commented May 16, 2024 via email

Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants