Description Usage Arguments Value See Also Examples
Peek
allows the samples from a file-backed MCMC to be loaded in
another R session while the MCMC is still in progress. By using Peek
,
the chain's convergence can be monitored before the MCMC chain has finished
running.
1 | Peek(backing.path)
|
backing.path |
directory path of an in-progress MCMC |
list of big.matrix with samples from the partial MCMC run
InitMcmc
, LoadMcmc
,
big.matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | SampleSomething <- function() {
Sys.sleep(0.1)
rnorm(1)
}
backing.path <- tempfile()
dir.create(backing.path)
print(backing.path)
SlowMcmc <- InitMcmc(1000, backing.path=backing.path)
SlowMcmc({
x <- SampleSomething()
})
### In another R process, while the MCMC is still running...
samples.so.far <- Peek(backing.path)
samples.so.far$x[,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.