country.names: Accessing Country Names

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/get_outputs.R

Description

The function returns country names for countries given either by their codes or by index.

Usage

1
country.names(meta, countries = NULL, index = FALSE)

Arguments

meta

Object of class bayesTFR.mcmc.meta, bayesTFR.mcmc.set, bayesTFR.mcmc, or bayesTFR.prediction.

countries

Vector of country codes or indices. If it is not given, names of all countries are returned.

index

Logical indicating if the argument countries is an index.

Details

The function considers countries that are included in the simulations and predictions. If the argument countries is not given, all countries are returned in the same order as they are stored in the meta object.

Value

Vector of country names.

Author(s)

Hana Sevcikova

See Also

get.country.object

Examples

1
2
3
4
5
6
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
m <- get.tfr.mcmc(sim.dir)
country.names(m)
# these two calls should give the same answer
country.names(m, c(800, 120))
country.names(m, c(15, 20), index=TRUE)

jasonacollins/bayesTFR1 documentation built on May 23, 2019, 7:34 a.m.