You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
# This code from # https://github.com/moderndive/ModernDive_book/blob/master/08-confidence-intervals.Rmd# is to visualize a bootstrap distribution:bootstrap_distribution<- read_rds("https://github.com/moderndive/ModernDive_book/blob/master/rds/bootstrap_distribution_balls.rds")
# Visualize bootstrap distribution of p-hatbootstrap_distribution %>%
visualize(binwidth=0.05, boundary=0.4, color="white") +
labs(
x="Proportion of 50 balls that were red",
title="Bootstrap distribution"
)
# Based on Figure 8.34 of ModernDive textbook, # the `color` argument is passed to ggplot2 functions, # but not the `binwidth` and `boundary` arguments, # since there are ~3 bins per 0.1 units and no bin has a boundary at 0.4.reprex::reprex(si=TRUE)
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: