#' Extract the posterior of a parameter
#'
#' Extracts and organizes the saved posterior samples for a given parameter,
#' including parameters that are vectors and arrays.
#'
#' @param output An object of class \code{jagsUI}.
#' @param parameter A parameter that was saved in the output samples.
#'
#' @return An array with one more dimension than the input parameter.
#' For example, if you saved 50 iterations, and the chosen parameter was
#' a 2x3 matrix, the resulting array will be 50x2x3.
#'
#' @export
posterior_array <- function(output, parameter){
#Check input validity
check_class(output)
check_parameter(parameter, output$samples)
get_posterior_array(parameter, output$samples)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.