Learn R Programming

bayesTFR (version 7.4-2)

get.tfr.trajectories: Accessing TFR Trajectories

Description

Function for accessing TFR trajectories.

Usage

get.tfr.trajectories(tfr.pred, country)

Value

Array of size number of projection periods (including the present year) times the number of trajectories. The row names correspond to the mid-years of the prediction periods.

Arguments

tfr.pred

Object of class bayesTFR.prediction.

country

Name or code of a country. The code can be either numeric or ISO-2 or ISO-3 characters.

Author

Hana Sevcikova

Details

The function loads TFR trajectories for the given country from disk, offsets it if needed (see tfr.median.shift) and returns it as a matrix.

See Also

bayesTFR.prediction, get.tfr.prediction, tfr.trajectories.table, tfr.median.shift

Examples

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

Run the code above in your browser using DataLab