Learn R Programming

bayesTFR (version 4.2-0)

get.tfr.prediction: Accessing a Prediction Object

Description

Function get.tfr.prediction retrieves results of a prediction and creates an object of class bayesTFR.prediction. Function has.tfr.prediction checks an existence of such results.

Usage

get.tfr.prediction(mcmc = NULL, sim.dir = NULL, mcmc.dir = NULL)

has.tfr.prediction(mcmc = NULL, sim.dir = NULL)

Arguments

Value

Function has.tfr.prediction returns a logical indicating if a prediction exists for the given mcmc. Function get.tfr.prediction returns an object of class bayesTFR.prediction.

Rdversion

1.1

Details

If mcmc is not NULL, the search directory is set to mcmc$meta$output.dir. This approach assumes that the prediction was stored in the same directory as the MCMC simulation, i.e. the output.dir argument of the tfr.predict function was set to NULL. If it is not the case, the argument mcmc.dir should be used.

See Also

bayesTFR.prediction, tfr.predict, summary.bayesTFR.prediction

Examples

Run this code
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
pred <- get.tfr.prediction(sim.dir=sim.dir)
summary(pred, country="Canada")

Run the code above in your browser using DataLab