Learn R Programming

demography (version 2.0)

extract.years: Extract some years from a demogdata object

Description

Creates subset of demogdata object.

Usage

extract.years(data, years)

Value

Demogdata object with same components as data but with a subset of years.

Arguments

data

Demogdata object such as created using read.demogdata or smooth.demogdata.

years

Vector of years to extract from data.

Author

Rob J Hyndman

Examples

Run this code
france.1918 <- extract.years(fr.mort,1918)

Run the code above in your browser using DataLab