makeSweave {indirect}R Documentation

Function to create summary document from a saved elicitation record.

Description

Creates a Sweave file that can be used to generate a pdf document of the summary report.

Usage

makeSweave(
  filename.rds = "",
  reportname = "",
  title = "Elicitation record",
  contact.details = "none",
  fitted.fractiles = TRUE,
  cumul.prob.bounds = c(0.05, 0.95)
)

Arguments

filename.rds

character, filename of the record saved as an RDS object, see ?saveRDS.

reportname

character, filename without extension to be used for the generated Sweave (.Rnw) file. The Sweave file supports the creation of report (.pdf) documentation and accompanying files such as the .tex file generated by using Sweave followed by tools::texi2pdf().

title

character, a title for the report

contact.details

character, an email address or other mechanism by which the expert may contact the facilitator or rapporteur

fitted.fractiles

logical or numeric vector. A logical value of FALSE will not plot any fitted fractiles from the fitted subjective probability distribution. A logical value of TRUE will plot the fitted fractiles that correspond to the final iteration of the raw elicited fractiles. Alternatively, a numeric vector can specify arbitrary fractiles for plotting from the fitted distribution, e.g., c(1/10, 1/4, 1/2, 3/4, 9/10)

cumul.prob.bounds

numeric vector that specifies the upper and lower plot bounds determined by this credible interval. The default is the 0.90 central credible interval, c(0.05, 0.95)

Examples

## Not run:  
X <- matrix(c(1, 1, 0, 1), nrow = 2) # design
Z <- designLink(design = X)
Z <- elicitPt(Z, design.pt = 1,
  lower.CI.bound = -1,
  median = 0,
  upper.CI.bound = 1,
  comment = "A completed elicitation scenario.")
tmp.rds <- tempfile(pattern = "record", fileext =".rds")
saveRecord(Z, file = tmp.rds)
tmpReport <- tempfile(pattern = "report")
makeSweave(filename.rds = tmp.rds, reportname = tmpReport)
setwd(tempdir())
utils::Sweave(paste0(tmpReport, ".Rnw"))
tools::texi2pdf(paste0(tmpReport, ".tex")) 

## End(Not run)

[Package indirect version 0.2.1 Index]