get.pop.prediction | R Documentation |
Function get.pop.prediction
retrieves results of a prediction from disk and creates an object of class bayesPop.prediction
. Function has.pop.prediction
checks an existence of such results.
get.pop.prediction(sim.dir, aggregation = NULL, write.to.cache = TRUE)
has.pop.prediction(sim.dir)
pop.cleanup.cache(pop.pred)
sim.dir |
Directory where the prediction is stored. It should correspond to the value of the |
aggregation |
If given, the prediction object is considered to be an aggregation and both arguments are passed to |
write.to.cache |
Logical controlling if other functions are allowed to write the cache of this prediction object (see Details). |
pop.pred |
Object of class |
The pop.predict
function stores resulting trajectories into a directory called output.dir
/prediction. Here the argument sim.dir
should correspond to output.dir
(i.e. without the “prediction” part).
In addition to retrieving prediction results, the get.pop.prediction
function also looks for a file called ‘cache.rda’ and loads it into an environment called cache
. If it does not exist, it creates an empty cache
environment. See pop.map
- Section Performance and Caching. The environment can be cleaned up using the pop.cleanup.cache
function which also deletes the ‘cache.rda’ file on disk. If write.to.cache
is FALSE
, other functions are not allowed to manipulate the ‘cache.rda’ file.
Function has.pop.prediction
returns a logical indicating if a prediction exists.
Function get.pop.prediction
returns an
object of class bayesPop.prediction
.
Hana Sevcikova
bayesPop.prediction
, get.pop.aggregation
sim.dir <- file.path(find.package("bayesPop"), "ex-data", "Pop")
pred <- get.pop.prediction(sim.dir)
summary(pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.