Description Usage Arguments Details Value Author(s) References See Also Examples
Creates subset of the HMDdata object.
1 2 3 4 |
country |
character string for the country name. |
data |
character string showing type of demographic series: either "Population", "Deaths", "Exposures" or "Rates". Default value "Population". |
sex |
character string showing sex of demographic series: either "Females", "Males" or "Total". Default value "Females". |
ages |
vector of ages to extract from data. If it is
|
years |
vector of years to extract from data. If it is
|
HMDdata
are loaded with the package.
Country names is not case-sensitive and initials can be used. However,
distinguishable country name is necessary. Type of data
and
sex
are case-sensitive and initials can be used.
Available ages are always from 0 to 110, whereas years depends on the country. Warning massages will be provided in case of selected default values. Attributes about country, data and sex will be given to the outcome.
Matrix object from HMDdata
with a subset of country,
type of data, sex, ages and years.
Carlo G Camarda
Camarda, C. G. (2012). MortalitySmooth: An R Package for Smoothing Poisson Counts with P-Splines. Journal of Statistical Software. 50, 1-24. http://www.jstatsoft.org/v50/i01/.
1 2 3 4 5 6 7 8 9 | ## "Complete" example
x <- 1950:2000
den50 <- selectHMDdata("Denmark", "Death", "Females", 50, x)
plot(x, den50, main="Danish female deaths at age 50")
## "Incomplete" example with warning
jap50 <- selectHMDdata("jap", "Pop", "F", 50)
## Wrong example (don't run)
## selectHMDdata("Sw", "Pop", "F", 50, 2000)
## Sw can stand for both Sweden and Switzerland
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.