post_remove: Remove nodes from mcmc.list

Description Usage Arguments Value Examples

View source: R/post_remove.R

Description

Just like post_subset(), but keep all nodes except those that match.

Usage

1
post_remove(post, params, ask = TRUE, auto_escape = TRUE)

Arguments

post

A mcmc.list object.

params

A vector of regular expressions specifying the nodes to match for removal. Accepts multi-element vectors to match more than one node at a time. See match_params() and vignette("pattern-matching") for more details.

ask

Prompt user for a response prior to removing nodes?

auto_escape

Automatically escape "[" and "]" characters? See match_params() for details.

Value

A mcmc.list, identical in all ways to the original except that nodes matched by the params argument are removed. If the user responds "no" to the question when ask = TRUE, post is returned unaltered.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load example mcmc.list
data(cjs)

# get names of all nodes
get_params(cjs)

# remove the SIG nodes
new_cjs = suppressMessages(post_remove(cjs, "SIG", ask = FALSE))

# get names of new output
get_params(new_cjs)

postpack documentation built on June 3, 2021, 1:07 a.m.