Skip to content

Commit 22b0d70

Browse files
committed
update args-mcmc-x roxygen template
1 parent 10aa75d commit 22b0d70

11 files changed

+35
-14
lines changed

R/helpers-mcmc.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,16 @@ df_with_chain2array <- function(x) {
165165
}
166166

167167

168-
# Check if an object is a list but not a data.frame
168+
# Check if an object is a list (but not a data.frame) that contains
169+
# all 2-D objects
169170
#
170171
# @param x object to check
171172
# @return TRUE or FALSE
172173
is_chain_list <- function(x) {
173174
check1 <- !is.data.frame(x) && is.list(x)
174175
dims <- sapply(x, function(chain) length(dim(chain)))
175-
isTRUE(all(dims == 2))
176+
check2 <- isTRUE(all(dims == 2)) # all elements of list should be matrices/2-D arrays
177+
check1 && check2
176178
}
177179

178180
validate_chain_list <- function(x) {

man-roxygen/args-mcmc-x.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#' @param x A 3-D array, matrix, list of matrices, or data frame of MCMC draws.
22
#' The \link{MCMC-overview} page provides details on how to specify each these
3-
#' allowed inputs.
3+
#' allowed inputs. It is also possible to use an object with an
4+
#' \code{as.array} method that returns the same kind of 3-D array described on
5+
#' the \link{MCMC-overview} page.

man/MCMC-combos.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-diagnostics.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-distributions.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-intervals.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-parcoord.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-recover.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-scatterplots.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MCMC-traces.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)