prep_pbar: Initialize and tick through the progress bar

Description Usage Arguments Value Examples

View source: R/TS.R

Description

prep_pbar creates and update_pbar steps through the progress bars (if desired) in TS

Usage

1
2
3
prep_pbar(control = list(), bar_type = "rho", nr = NULL)

update_pbar(pbar, control = list())

Arguments

control

A list of parameters to control the fitting of the Time Series model including the parallel tempering Markov Chain Monte Carlo (ptMCMC) controls. Values not input assume defaults set by TS_control. Of use here is quiet which is a a logical indicator of whether there should be information (i.e. the progress bar) printed during the run or not. Default is TRUE.

bar_type

"rho" (for change point locations) or "eta" (for regressors).

nr

integer number of unique realizations, needed when bar_type = "eta".

pbar

The progress bar object returned from prep_pbar.

Value

prep_pbar: the initialized progress bar object.

update_pbar: the ticked-forward pbar.

Examples

1
2
3
  pb <- prep_pbar(control = list(nit = 2)); pb
  pb <- update_pbar(pb); pb
  pb <- update_pbar(pb); pb

weecology/LDATS documentation built on March 28, 2020, 11:20 a.m.