Learn R Programming

bayesTFR (version 3.0-8)

country.names: Accessing Country Names

Description

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

Usage

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

Arguments

Value

Vector of country names.

Rdversion

1.1

Details

The function considers countries from the UN2008 dataset 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 UN dataset.

See Also

UN2008, get.country.object

Examples

Run this code
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)

Run the code above in your browser using DataLab