Skip to content

Error in section 3.2.1 of book #4

@rpollack

Description

@rpollack

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 :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions