Skip to content

issue with missing values in Exercise 25 in chapter 5 #526

@nicholasjhorton

Description

@nicholasjhorton

I suspect that the counties with 0 hispanic_2017 are getting silently elided when log(hispanic_2017) is run.

I wonder if the code https://github.com/OpenIntroStat/ims/blob/7227c6e2f90b9f1cb804aa013f40ae1eba41fae3/exercises/_05-ex-explore-numerical.qmd#L572C5-L573C47 might be updated to log(1 + hispanic_2017) and the text slightly revised: logs of one plus these values.

suppressPackageStartupMessages(library(openintro))
suppressPackageStartupMessages(library(tidyverse))
county_complete |>
  select(fips, name, state, hispanic_2017) |> 
  arrange(hispanic_2017) |>
  head()
#>    fips             name        state hispanic_2017
#> 1 28061    Jasper County  Mississippi             0
#> 2 30069 Petroleum County      Montana             0
#> 3 31005    Arthur County     Nebraska             0
#> 4 31009    Blaine County     Nebraska             0
#> 5 31115      Loup County     Nebraska             0
#> 6 46061    Hanson County South Dakota             0

Created on 2026-02-13 with reprex v2.1.1

This doesn't directly relate to #525 except both are the same exercise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions