Closed wmorgan485 closed 10 months ago
Thanks for the issue!
A reprex:
library(tidyverse)
library(infer)
bootstrap_distribution <- read_rds("https://github.com/moderndive/ModernDive_book/raw/master/rds/bootstrap_distribution_balls.rds")
# Visualize bootstrap distribution of p-hat
bootstrap_distribution %>%
visualize(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(
x = "Proportion of 50 balls that were red",
title = "Bootstrap distribution"
)
Created on 2023-09-05 with reprex v2.0.2
It looks to me like every one of binwidth
, boundary
, and color
here are either ignored or overwritten internally. We can debug on infer:::simulation_layer
and infer:::theoretical_layer
to see how these do or don't get passed. In this case:
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.
< --
~~~~~~~~~~~~-->The problem
Some arguments included in visualize( ) apparently aren't used by ggplot2 functions. This is apparent in Figure 8.34 of the ModernDive textbook, as described below.
Reproducible example