Last data update: 2014.03.03
|
R: Population size in Denmark
Population size in Denmark
Description
The population size at 1st January in ages 0-99.
Usage
data(N.dk)
Format
A data frame with 7200 observations on the following 4 variables.
sex Sex, 1:males, 2:females
A Age. 0:0, 1:1, ..., 98:98, 99:99+
P Year
N Number of persons alive at 1st January year P
Source
http://www.statistikbanken.dk/statbank5a/SelectTable/omrade0.asp?SubjectCode=02&PLanguage=1&ShowNews=OFF
Examples
data(N.dk)
str(N.dk)
with(N.dk,addmargins(tapply(N,list(P,sex),sum),2))
with(subset(N.dk,P==max(P)),addmargins(tapply(N,list(A,sex),sum)))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Epi)
Attaching package: 'Epi'
The following object is masked from 'package:base':
merge.data.frame
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Epi/N.dk.Rd_%03d_medium.png", width=480, height=480)
> ### Name: N.dk
> ### Title: Population size in Denmark
> ### Aliases: N.dk
> ### Keywords: datasets
>
> ### ** Examples
>
> data(N.dk)
> str(N.dk)
'data.frame': 8600 obs. of 4 variables:
$ sex: num 1 2 1 2 1 2 1 2 1 2 ...
$ A : num 0 0 1 1 2 2 3 3 4 4 ...
$ P : num 1971 1971 1971 1971 1971 ...
$ N : num 35839 34108 36302 34153 37855 ...
- attr(*, "Contents")= chr "Population size as of 1 January in Denmark"
> with(N.dk,addmargins(tapply(N,list(P,sex),sum),2))
1 2 Sum
1971 2459880 2490844 4950724
1972 2470257 2505518 4975775
1973 2484869 2522780 5007649
1974 2498227 2538075 5036302
1975 2504278 2550248 5054526
1976 2506903 2558526 5065429
1977 2512888 2567113 5080001
1978 2519900 2577178 5097078
1979 2525645 2586011 5111656
1980 2529111 2593078 5122189
1981 2528285 2595833 5124118
1982 2523888 2595397 5119285
1983 2521280 2595311 5116591
1984 2518002 2594253 5112255
1985 2517131 2594096 5111227
1986 2520624 2595769 5116393
1987 2526079 2598836 5124915
1988 2528051 2601317 5129368
1989 2528219 2601673 5129892
1990 2530653 2604872 5135525
1991 2536442 2610138 5146580
1992 2544511 2617733 5162244
1993 2554650 2626078 5180728
1994 2563497 2633256 5196753
1995 2573379 2642452 5215831
1996 2592277 2658860 5251137
1997 2604982 2670233 5275215
1998 2615716 2679242 5294958
1999 2625470 2688210 5313680
2000 2634169 2695950 5330119
2001 2644369 2704945 5349314
2002 2654198 2714262 5368460
2003 2662423 2721084 5383507
2004 2670135 2727505 5397640
2005 2677292 2734113 5411405
2006 2685846 2741613 5427459
2007 2696662 2750422 5447084
2008 2712666 2763125 5475791
2009 2732020 2779431 5511451
2010 2743286 2791452 5534738
2011 2756582 2804046 5560628
2012 2766776 2813740 5580516
2013 2778852 2823776 5602628
> with(subset(N.dk,P==max(P)),addmargins(tapply(N,list(A,sex),sum)))
1 2 Sum
0 29991 28255 58246
1 30402 29316 59718
2 33032 31390 64422
3 32921 31085 64006
4 34325 32239 66564
5 33629 32014 65643
6 34197 32437 66634
7 33446 32230 65676
8 33628 32173 65801
9 33695 32071 65766
10 33498 31669 65167
11 33797 32476 66273
12 34841 33387 68228
13 34455 33094 67549
14 34863 33040 67903
15 35710 33883 69593
16 36099 34179 70278
17 37455 35379 72834
18 37572 35919 73491
19 36981 35047 72028
20 37928 36018 73946
21 36674 35457 72131
22 36904 35693 72597
23 36187 35150 71337
24 35357 34257 69614
25 34078 32926 67004
26 33753 32701 66454
27 32718 32152 64870
28 31548 31056 62604
29 30650 30640 61290
30 31684 30969 62653
31 31250 31121 62371
32 33162 33060 66222
33 33751 33648 67399
34 34842 34576 69418
35 34598 34498 69096
36 36142 35679 71821
37 38717 39081 77798
38 38288 38333 76621
39 38383 38252 76635
40 39925 39996 79921
41 39916 39131 79047
42 38172 37693 75865
43 38172 37366 75538
44 39665 38507 78172
45 42267 41341 83608
46 45376 44261 89637
47 43814 42912 86726
48 42961 41671 84632
49 41768 40980 82748
50 39383 38708 78091
51 38174 37645 75819
52 38105 37500 75605
53 36328 36056 72384
54 36344 36127 72471
55 35939 35761 71700
56 36002 35963 71965
57 35446 35260 70706
58 34255 34805 69060
59 34821 35129 69950
60 33880 34380 68260
61 33298 33484 66782
62 33688 34725 68413
63 33238 34308 67546
64 34812 35668 70480
65 36693 37607 74300
66 37621 38275 75896
67 35774 36581 72355
68 33179 34665 67844
69 29795 31845 61640
70 27667 29417 57084
71 23947 25976 49923
72 22713 25017 47730
73 21019 23319 44338
74 20088 22831 42919
75 18412 21758 40170
76 17154 20165 37319
77 15525 18786 34311
78 14230 17761 31991
79 12849 16449 29298
80 11614 15687 27301
81 10685 14639 25324
82 9746 13779 23525
83 8813 12860 21673
84 8058 12289 20347
85 6796 11234 18030
86 6134 10557 16691
87 5144 9660 14804
88 4339 8801 13140
89 3456 7760 11216
90 2727 6324 9051
91 2298 5832 8130
92 1780 4960 6740
93 1164 3388 4552
94 873 2723 3596
95 544 2072 2616
96 406 1595 2001
97 261 1093 1354
98 178 804 982
99 270 1340 1610
Sum 2778852 2823776 5602628
>
>
>
>
>
> dev.off()
null device
1
>
|