Skip to content

Commit 6ef9548

Browse files
committed
update to roxygen2 v7.0.1
1 parent db0f16e commit 6ef9548

33 files changed

Lines changed: 872 additions & 381 deletions

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ cache: packages
66

77
r_github_packages:
88
- r-lib/covr
9-
- tidyverse/ggplot2
109

1110
r_build_args: '--no-build-vignettes'
1211
r_check_args: '--ignore-vignettes'
12+
warnings_are_errors: true
13+
14+
env:
15+
- _R_CHECK_FORCE_SUGGESTS_=false NOT_CRAN=true MAKEFLAGS=-j2
1316

1417
before_install:
1518
- mkdir -p ~/.R

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Suggests:
4949
shinystan (>= 2.3.0),
5050
testthat (>= 2.0.0),
5151
vdiffr
52-
RoxygenNote: 6.1.1
52+
RoxygenNote: 7.0.1
5353
VignetteBuilder: knitr
5454
Encoding: UTF-8
5555
Roxygen: list(markdown = TRUE)

R/bayesplot-package.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#' only to provide convenient functionality for users, but also a common set of
2020
#' functions that can be easily used by developers working on a variety of
2121
#' packages for Bayesian modeling, particularly (but not necessarily) packages
22-
#' powered by [**rstan**][rstan::rstan-package] (the \R interface to Stan).
22+
#' powered by RStan (the \R interface to Stan).
2323
#' Examples of packages that will soon (or already are) using **bayesplot** are
2424
#' **rstan** itself, as well as the **rstan**-dependent **rstanarm** and
2525
#' **brms** packages for applied regression modeling.
@@ -32,11 +32,11 @@
3232
#' }
3333
#'
3434
#' The plotting functions in **bayesplot** are organized into several modules:
35-
#' * [__MCMC__][MCMC-overview]: Visualizations of Markov chain
35+
#' * [MCMC][MCMC-overview]: Visualizations of Markov chain
3636
#' Monte Carlo (MCMC) simulations generated by *any* MCMC algorithm
3737
#' as well as diagnostics. There are also additional functions specifically
3838
#' for use with models fit using the [No-U-Turn Sampler (NUTS)][NUTS].
39-
#' * [__PPC__][PPC-overview]: Graphical prior and posterior predictive
39+
#' * [PPC][PPC-overview]: Graphical prior and posterior predictive
4040
#' checks (PPCs).
4141
#'
4242
#' In future releases modules will be added specifically for

R/helpers-mcmc.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ parameter_names.array <- function(x) {
310310
parameter_names.default <- function(x) {
311311
colnames(x) %||% abort("No parameter names found.")
312312
}
313+
# parameter_names.matrix <- function(x) {
314+
# colnames(x) %||% abort("No parameter names found.")
315+
# }
313316

314317
# Check if an object is a 3-D array
315318
is_3d_array <- function(x) {

R/mcmc-intervals.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#' @param ... Currently unused.
1414
#' @param prob The probability mass to include in the inner interval (for
1515
#' `mcmc_intervals()`) or in the shaded region (for `mcmc_areas()`). The
16-
#' default is `0.5` (50\% interval) and `1` for `mcmc_areas_ridges()`.
16+
#' default is `0.5` (50% interval) and `1` for `mcmc_areas_ridges()`.
1717
#' @param prob_outer The probability mass to include in the outer interval. The
18-
#' default is `0.9` for `mcmc_intervals()` (90\% interval) and
18+
#' default is `0.9` for `mcmc_intervals()` (90% interval) and
1919
#' `1` for `mcmc_areas()` and for `mcmc_areas_ridges()`.
2020
#' @param area_method How to constrain the areas in `mcmc_areas()`. The
2121
#' default is `"equal area"`, setting the density curves to have the same

R/mcmc-overview.R

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,47 @@
1111
#' documentation for various categories of MCMC plots. Currently the MCMC
1212
#' plotting functions accept posterior draws provided in one of the following
1313
#' formats:
14-
#' * __3-D array__: An array with dimensions `[Iteration, Chain, Parameter]`
15-
#' in that order.
14+
#' * __3-D array__: An array with dimensions `Iteration, Chain, Parameter` in
15+
#' that order.
1616
#' * __list__: A list of matrices, where each matrix corresponds to a Markov
17-
#' chain. All of the matrices should have the same number of iterations (rows)
18-
#' and parameters (columns), and parameters should have the same names and be
19-
#' in the same order.
17+
#' chain. All of the matrices should have the same number of iterations (rows)
18+
#' and parameters (columns), and parameters should have the same names and be in
19+
#' the same order.
2020
#' * __matrix (2-D array)__: A matrix with one column per parameter. If using
21-
#' matrix there should only be a single Markov chain or all chains should
22-
#' already be merged (stacked).
23-
#' * __data frame__: There are two types of [data frames][base::data.frame]
24-
#' allowed. Either a data frame with one column per parameter (if only a single
25-
#' chain or all chains have already been merged), or a data frame with one
26-
#' column per parameter plus an additional column `"Chain"` that contains the
27-
#' chain number (an integer) corresponding to each row in the data frame.
21+
#' matrix there should only be a single Markov chain or all chains should
22+
#' already be merged (stacked).
23+
#' * __data frame__: There are two types of data frames allowed. Either a data
24+
#' frame with one column per parameter (if only a single chain or all chains
25+
#' have already been merged), or a data frame with one column per parameter plus
26+
#' an additional column `"Chain"` that contains the chain number (an integer)
27+
#' corresponding to each row in the data frame.
2828
#'
2929
#' __Note__: typically the user should *not* include warmup iterations
3030
#' in the object passed to **bayesplot** plotting functions, although for
3131
#' certain plots (e.g. trace plots) it can occasionally be useful to include the
3232
#' warmup iterations for diagnostic purposes.
3333
#'
3434
#' @section MCMC plotting functions:
35-
#' * [__Posterior distributions__][MCMC-distributions]:
35+
#'
36+
#' * [Posterior distributions][MCMC-distributions]:
3637
#' Histograms and kernel density plots of parameter draws, optionally
3738
#' showing each Markov chain separately.
38-
#' * [__Uncertainty intervals__][MCMC-intervals]: Uncertainty intervals computed
39+
#' * [Uncertainty intervals][MCMC-intervals]: Uncertainty intervals computed
3940
#' from parameter draws.
40-
#' * [__Trace plots__][MCMC-traces]: Times series of parameter draws, optionally
41+
#' * [Trace plots][MCMC-traces]: Times series of parameter draws, optionally
4142
#' including HMC/NUTS diagnostic information.
42-
#' * [__Scatterplots__][MCMC-scatterplots]: Scatterplots, heatmaps, and pairs
43+
#' * [Scatterplots][MCMC-scatterplots]: Scatterplots, heatmaps, and pairs
4344
#' plots of parameter draws, optionally including HMC/NUTS diagnostic
4445
#' information.
45-
#' * [__Parallel coordinates plots__][MCMC-parcoord]: Parallel coordinates plot
46+
#' * [Parallel coordinates plots][MCMC-parcoord]: Parallel coordinates plot
4647
#' of MCMC draws (one dimension per parameter), optionally including
4748
#' HMC/NUTS diagnostic information.
48-
#' * [__Combos__][MCMC-combos]: Combination plots (e.g. trace plot + histogram).
49-
#' * [__General MCMC diagnostics__][MCMC-diagnostics]: MCMC diagnostic plots
49+
#' * [Combos][MCMC-combos]: Combination plots (e.g. trace plot + histogram).
50+
#' * [General MCMC diagnostics][MCMC-diagnostics]: MCMC diagnostic plots
5051
#' including R-hat, effective sample size, autocorrelation.
51-
#' [__NUTS diagnostics__][MCMC-nuts]: Special diagnostic plots for
52+
#' [NUTS diagnostics][MCMC-nuts]: Special diagnostic plots for
5253
#' the No-U-Turn Sampler.
53-
#' * [__Comparisons to "true" values__][MCMC-recover]: Plots comparing MCMC
54+
#' * [Comparisons to "true" values][MCMC-recover]: Plots comparing MCMC
5455
#' estimates to "true" parameter values (e.g., values used to simulate data).
5556
#'
5657
#' @template reference-vis-paper

R/mcmc-recover.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#' within which it makes sense to use the same y-axis.
2828
#' @param ... Currently unused.
2929
#' @param prob The probability mass to include in the inner interval. The
30-
#' default is `0.5` (50\% interval).
30+
#' default is `0.5` (50% interval).
3131
#' @param prob_outer The probability mass to include in the outer interval. The
32-
#' default is `0.9` (90\% interval).
32+
#' default is `0.9` (90% interval).
3333
#' @param point_est The point estimate to show. Either `"median"` (the
3434
#' default), `"mean"`, or `"none"`.
3535
#' @param size,alpha Passed to [ggplot2::geom_point()] to control the

R/ppc-loo.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ ppc_loo_pit <-
284284
#' are computed internally before plotting. If specified, `intervals`
285285
#' must be a matrix with number of rows equal to the number of data points and
286286
#' five columns in the following order: lower outer interval, lower inner
287-
#' interval, median (50\%), upper inner interval and upper outer interval
287+
#' interval, median (50%), upper inner interval and upper outer interval
288288
#' (column names are ignored).
289289
#' @param order For `ppc_loo_intervals()`, a string indicating how to arrange
290290
#' the plotted intervals. The default (`"index"`) is to plot them in the

man/MCMC-combos.Rd

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-diagnostics.Rd

Lines changed: 30 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)