Learn R Programming

eha (version 2.11.5)

swepop: Swedish population data, 1969-2020.

Description

A data frame containing data on the population size by sex, age and year, Sweden 1969-2020.

Usage

data(swepop)

Arguments

Format

A data frame with 5 variables and 10504 observations.

age

Numerical with integer values 0-100, representing achieved age in years during the actual calendar year.The highest value, 100, represents ages 100 and above.

sex

A factor with two levels, "women" and "men".

year

Calendar year.

pop

Average population by age, sex, and year.

id

Created by the reshape procedure, see Details.

Details

Data are downloaded from Statistics Sweden in the form of a csv file and converted to a data frame. Variable names are translated from Swedish, and some of them are coverted to factors. The variable pop contains the average population by sex and age, calculated by taking the mean value of the population size at December 31 the previous year and December 31 the current year. The original data contain the sizes at the end of each year. The original data set is in wide format and converted to long format by reshape.

See Also

swedeaths

Examples

Run this code
summary(swepop)
## maybe str(swepop) ...

Run the code above in your browser using DataLab