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

Error in section 3.2.1 of book #4

Open
rpollack opened this issue Jan 5, 2015 · 2 comments
Open

Error in section 3.2.1 of book #4

rpollack opened this issue Jan 5, 2015 · 2 comments

Comments

@rpollack
Copy link

rpollack commented Jan 5, 2015

Hello, I searched online but couldn't find anywhere to post errata, so I'm trying here :-) In section 3.2.1 of the book, we enter the following text:

hof$Era <- cut(hof$MidCareer, breaks=c(1800, 1900, 1919, 1941, 1960, 1976, 1993, 2050), labels=c("19th Century", "Lively Ball", "Dead Ball", "Integration", "Expansion", "Free Agency", "Long Ball"))

I think this command incorrectly switches "Lively Ball" and "Dead Ball". Because in the paragraph above, DB comes before LB, but in this cut() command, LB is first. Also, later in the section, the book shows that "Lively Ball" has 46 entries in the hofbatting table. But with the command above, it's "Dead Ball" that has 46 entries.

So I think the correct command is:

hof$Era <- cut(hof$MidCareer, breaks=c(1800, 1900, 1919, 1941, 1960, 1976, 1993, 2050), labels=c("19th Century", "Dead Ball", "Lively Ball", "Integration", "Expansion", "Free Agency", "Long Ball"))

When I enter this command and the subsequence ones, I get the results shown in the book.

Thanks, and I apologize if this has already been reported or if it's the wrong place to do so :-)

@bayesball
Copy link
Collaborator

Ryan:

Thanks for finding that typo. We should be putting together an errata list
-- we'll try to get that posted soon.

Best:

Jim Albert

On Sun, Jan 4, 2015 at 7:49 PM, Ryan Pollack notifications@github.com
wrote:

Hello, I searched online but couldn't find anywhere to post errata, so I'm
trying here :-) In section 3.2.1 of the book, we enter the following text:

hof$Era <- cut(hof$MidCareer, breaks=c(1800, 1900, 1919, 1941, 1960, 1976,
1993, 2050), labels=c("19th Century", "Lively Ball", "Dead Ball",
"Integration", "Expansion", "Free Agency", "Long Ball"))

I think this command incorrectly switches "Lively Ball" and "Dead Ball".
Because in the paragraph above, DB comes before LB, but in this cut()
command, the two are reversed. Also, later in the section, the book shows
that "Lively Ball" has 46 entries in the hofbatting table. But with the
command above, it's "Dead Ball" that has 46 entries.

Thanks, and I apologize if this has already been reported or if it's the
wrong place to do so :-)


Reply to this email directly or view it on GitHub
#4.

@beanumber
Copy link

Fixed in the 2nd edition. Thanks @rpollack .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants