View source: R/create_report.R
create_report | R Documentation |
Convenience function for creating a summary of results using R Markdown
create_report(
outdir = getwd(),
filename = "espresso_report",
plot.height = 3,
model.ranks = 1
)
outdir |
Output directory. Defaults to the current working directory. |
filename |
Output file name (without the file extension). Defaults to |
plot.height |
Height of tile plots used for comparing species groupings. |
model.ranks |
Used to define which models to get dose-response curves for when |
An html file showing the outputs of summary.brsdata
, summary.rjtrace
, plot.rjtrace
, and plot.dose_response
.
Phil J. Bouchet
summary.brsdata
summary.rjtrace
plot.rjtrace
plot.dose_response
## Not run:
library(espresso)
# Import the example data, excluding species with sample sizes < 5
# and considering the sonar covariate
mydat <- read_data(file = NULL, min.N = 5, covariates = "sonar")
summary(mydat)
# Configure the sampler
mydat.config <- configure_rjMCMC(dat = mydat,
model.select = TRUE,
covariate.select = FALSE,
proposal.mh = list(t.ij = 10, mu.i = 10,
mu = 7, phi = 10, sigma = 10),
proposal.rj = list(dd = 20, cov = 7),
prior.covariates = c(0, 30),
n.rep = 100)
summary(mydat.config)
# Run the reversible jump MCMC
rj <- run_rjMCMC(dat = mydat.config,
n.chains = 2,
n.burn = 100,
n.iter = 100,
do.update = FALSE)
# Extract results
rj.post <- trace_rjMCMC(rj)
# Generate report
create_report()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.