Learn R Programming

MESS (version 0.5.7)

bdstat: Danish live births and deaths

Description

Monthly live births and deaths in Denmark from January 1901 to March 2013.

Arguments

Format

A data frame with 1356 observations on the following 4 variables.

year

a numeric vector giving the month

month

a numeric vector giving the year

births

a numeric vector. The number of births for the given month and year

dead

a numeric vector. The number of deaths for the given month and year

Examples

Run this code
# NOT RUN {
data(bdstat)

plot(bdstat$year + bdstat$month/13, bdstat$birth, type="l")

# Create a table of births
# Remove year 2013 as it is incomplete
btable <- xtabs(births ~ year + month, data=bdstat, subset=(year<2013))

# Compute yearly birth frequencies per month
btable.freq <- prop.table(btable, margin=1)

# }

Run the code above in your browser using DataLab