A data frame containing data on the number of deaths by sex, age and year, Sweden 1968-2019.

data(swedeaths)

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.

deaths

Number of deaths 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 and in that process converted to a data frame. Variable names are translated from Swedish, and some of them are coverted to factors. Each numeric column 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 form and then converted to long format.

Source

Statistics Sweden, https://scb.se.

See also

Examples

summary(swedeaths)
#> age sex year deaths id #> Min. : 0 women:5252 Min. :1968 Min. : 0.0 Min. : 1.0 #> 1st Qu.: 25 men :5252 1st Qu.:1981 1st Qu.: 32.0 1st Qu.: 51.0 #> Median : 50 Median :1994 Median : 140.5 Median :101.5 #> Mean : 50 Mean :1994 Mean : 450.2 Mean :101.5 #> 3rd Qu.: 75 3rd Qu.:2006 3rd Qu.: 718.0 3rd Qu.:152.0 #> Max. :100 Max. :2019 Max. :2608.0 Max. :202.0
## maybe str(swedeaths) ...