Running examples in 'infer-Ex.R' failed
The error most likely occurred in:

> ### Name: visualize
> ### Title: Visualize statistical inference
> ### Aliases: visualize visualise
> 
> ### ** Examples
> 
>   
> # generate a null distribution
> null_dist <- gss %>%
+   # we're interested in the number of hours worked per week
+   specify(response = hours) %>%
+   # hypothesizing that the mean is 40
+   hypothesize(null = "point", mu = 40) %>%
+   # generating data points for a null distribution
+   generate(reps = 1000, type = "bootstrap") %>%
+   # calculating a distribution of means
+   calculate(stat = "mean")
>   
> # or a bootstrap distribution, omitting the hypothesize() step,
> # for use in confidence intervals
> boot_dist <- gss %>%
+   specify(response = hours) %>%
+   generate(reps = 1000, type = "bootstrap") %>%
+   calculate(stat = "mean")
>   
> # we can easily plot the null distribution by piping into visualize
> null_dist %>%
+   visualize()
> 
> # we can add layers to the plot as in ggplot, as well... 
> # find the point estimate---mean number of hours worked per week
> point_estimate <- gss %>%
+   specify(response = hours) %>%
+   calculate(stat = "mean")
>   
> # find a confidence interval around the point estimate
> ci <- boot_dist %>%
+   get_confidence_interval(point_estimate = point_estimate,
+                           # at the 95% confidence level
+                           level = .95,
+                           # using the standard error method
+                           type = "se")  
>   
> # display a shading of the area beyond the p-value on the plot
> null_dist %>%
+   visualize() +
+   shade_p_value(obs_stat = point_estimate, direction = "two-sided")
> 
> # ...or within the bounds of the confidence interval
> null_dist %>%
+   visualize() +
+   shade_confidence_interval(ci)
>   
> # plot a theoretical sampling distribution by creating
> # a theory-based distribution with `assume()`
> sampling_dist <- gss %>%
+   specify(response = hours) %>%
+   assume(distribution = "t") 
>   
> visualize(sampling_dist)
> 
> # you can shade confidence intervals on top of
> # theoretical distributions, too---the theoretical
> # distribution will be recentered and rescaled to
> # align with the confidence interval
> visualize(sampling_dist) +
+   shade_confidence_interval(ci)
> 
> 
> # to plot both a theory-based and simulation-based null distribution,
> # use a theorized statistic (i.e. one of t, z, F, or Chisq)
> # and supply the simulation-based null distribution
> null_dist_t <- gss %>%
+   specify(response = hours) %>%
+   hypothesize(null = "point", mu = 40) %>%
+   generate(reps = 1000, type = "bootstrap") %>%
+   calculate(stat = "t")
>   
> obs_stat <- gss %>%
+   specify(response = hours) %>%
+   hypothesize(null = "point", mu = 40) %>%
+   calculate(stat = "t")
> 
> visualize(null_dist_t, method = "both")
Warning: Check to make sure the conditions have been met for the theoretical method. {infer} currently does not check these for you.
> 
> visualize(null_dist_t, method = "both") +
+   shade_p_value(obs_stat, "both")
Warning: Check to make sure the conditions have been met for the theoretical method. {infer} currently does not check these for you.
> 
> 
> # More in-depth explanation of how to use the infer package
> ## Not run: 
> ##D vignette("infer")
> ## End(Not run)
> 
> 
> 
> 
> ### * <FOOTER>
> ###
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed:  33.62 0.59 34.41 NA NA 
> grDevices::dev.off()
null device 
          1 
> ###
> ### Local variables: ***
> ### mode: outline-minor ***
> ### outline-regexp: "\\(> \\)?### [*]+" ***
> ### End: ***
> quit('no')