readTrace | R Documentation |
Read trace
readTrace( paths, format = "simple", delim, burnin = 0, check.names = FALSE, skip, ... )
paths |
(vector of character strings; no default) File path(s) to trace file. |
format |
(single character string; default = simple) Indicates type of MCMC trace, complex indicates cases where trace contains vectors of vectors/ matrices - mnStochasticVariable monitor will sometimes be of this type. |
delim |
(single character string) Delimiter of file. |
burnin |
(single numeric value; default = 0.1) Fraction of generations to discard (if value provided is between 0 and 1) or number of generations (if value provided is greater than 1). |
check.names |
(logical; default = FALSE) Passed to utils::read.table(); indicates if utils::read.table() should check column names and replace syntactically invalid characters. |
skip |
Number of lines to skip before reading the data from the log file. |
... |
(various) Additional arguments passed to utils::read.table(). |
Reads in MCMC log files
Reads in one or multiple MCMC log files from the same analysis and discards a user-specified burn-in, compatible with multiple monitor types. If the trace contains vectors of vectors and the user does not specify format = "complex", readTrace() will read in those columns as factors rather than as numeric vectors.
List of dataframes (of length 1 if only 1 log file provided).
## Not run: file <- system.file("extdata", "sub_models/primates_cytb_covariotide.p", package="RevGadgets") one_trace <- readTrace(paths = file) multi_trace <- readTrace(paths = c(file, file)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.