Skip to content

Commit

Permalink
fix typos in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabry committed May 22, 2019
1 parent 8352a81 commit a5b218d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions R/bayesplot-colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#'
#' @return `color_scheme_set()` has the side effect of setting the color scheme
#' used for plotting. It also returns ([invisibly][base::invisible]) a list of
#' the hexidecimal color values used in `scheme`.
#' the hexadecimal color values used in `scheme`.
#'
#' `color_scheme_get()` returns a list of the hexadecimal color
#' values (without changing the current scheme). If the `scheme` argument
Expand Down Expand Up @@ -61,7 +61,7 @@
#' @section Custom color schemes: A **bayesplot** color scheme consists of six
#' colors. To specify a custom color scheme simply pass a character vector
#' containing either the names of six [colors][grDevices::colors] or six
#' hexidecimal color values (or a mix of names and hex values). The colors
#' hexadecimal color values (or a mix of names and hex values). The colors
#' should be in order from lightest to darkest. See the end of the
#' **Examples** section for a demonstration.
#'
Expand Down Expand Up @@ -344,7 +344,7 @@ prepare_custom_colors <- function(scheme) {
}
if (length(not_found)) {
abort(paste(
"Each color must specified as either a hexidecimal color value ",
"Each color must specified as either a hexadecimal color value ",
"(e.g. '#C79999') or the name of a color (e.g. 'blue'). ",
"The following provided colors were not found:",
paste(unlist(not_found), collapse = ", ")
Expand Down
4 changes: 2 additions & 2 deletions R/mcmc-combo.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
#' `widths = c(2, 1)` will allocate more space for the first column by a
#' factor of 2 (as would `widths = c(.3, .15)`, etc.). The default,
#' `NULL`, allocates the same horizontal space for each column.
#' @param gg_theme Unlike most of the other **bayesplot**functions,
#' @param gg_theme Unlike most of the other **bayesplot** functions,
#' `mcmc_combo` returns a gtable object rather than a ggplot object, and
#' so theme objects can't be added directly to the returned plot object. The
#' `gg_theme` argument helps get around this problem by accepting a
#' **ggplot2** [theme][ggplot2::theme] object that is added to each of the
#' plots *before* combining them into the gtable object that is returned.
#' This can be a theme object created by a call to [ggplot2::theme()] or
#' one of the **bayesplot**convenience functions, e.g.
#' one of the **bayesplot** convenience functions, e.g.
#' [legend_none()] (see the **Examples** section, below).
#'
#' @return A gtable object (the result of calling
Expand Down
4 changes: 2 additions & 2 deletions R/ppc-overview.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
#' overlaid. The x-axis variable can be optionally specified by the user
#' (e.g. to plot against against a predictor variable or over time).
#' * [__Predictive errors__][PPC-errors]: Plots of predictive errors
#' (`y - yrep`) computed from `y` and eachc of the simulated datasets (rows)
#' (`y - yrep`) computed from `y` and each of the simulated datasets (rows)
#' in `yrep`. For binomial models binned error plots are also available.
#' * [__Scatterplots__][PPC-scatterplots]: Scatterplots (and similar
#' visualizations) of the data `y` vs. individual simuluted datasets
#' visualizations) of the data `y` vs. individual simulated datasets
#' (rows) in `yrep`, or vs. the average value of the distributions of each
#' data point (columns) in `yrep`.
#' * [__Plots for discrete outcomes__][PPC-discrete]: PPC functions that can
Expand Down
4 changes: 2 additions & 2 deletions man/MCMC-combos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/PPC-overview.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/bayesplot-colors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vignettes/visual-mcmc-diagnostics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ something is wrong with the model and the results should not be trusted.
For an explanation of these warnings see
[Divergent transitions after warmup](https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup).
We'll have a look at diagnosing the source of the divergences first and then
dive into some diagnostics that should be checked even if there are no warnigns
dive into some diagnostics that should be checked even if there are no warnings
from the sampler.

<br>
Expand Down Expand Up @@ -242,7 +242,7 @@ MCMC plotting functions demonstrated in the
[_Plotting MCMC draws_](https://mc-stan.org/bayesplot/articles/plotting-mcmc-draws.html)
vignette also take optional arguments that can be used to display important
HMC/NUTS diagnostic information. We'll see examples of this in the next
section on divergenent transitions.
section on divergent transitions.


### Divergent transitions
Expand Down Expand Up @@ -603,7 +603,7 @@ The **bayesplot** package provides the functions `mcmc_rhat` and
`mcmc_rhat_hist` for visualizing $\hat{R}$ estimates.

First we'll quickly fit one of the models above again, this time intentionally
using too few MCMC iterations and allowing more dispered initial values.
using too few MCMC iterations and allowing more dispersed initial values.
This should lead to some high $\hat{R}$ values.

```{r, results='hide'}
Expand Down

0 comments on commit a5b218d

Please sign in to comment.