source("lab0/more/present.R")
source("Lab0/more/arbuthnot.R")
arbuthnot$girls
## [1] 4683 4457 4102 4590 4839 4820 4928 4605 4457 4952 4784 5332 5200 4910
## [15] 4617 3997 3919 3395 3536 3181 2746 2722 2840 2908 2959 3179 3349 3382
## [29] 3289 3013 2781 3247 4107 4803 4881 5681 4858 4319 5322 5560 5829 5719
## [43] 6061 6120 5822 5738 5717 5847 6203 6033 6041 6299 6533 6744 7158 7127
## [57] 7246 7119 7214 7101 7167 7302 7392 7316 7483 6647 6713 7229 7767 7626
## [71] 7452 7061 7514 7656 7683 5738 7779 7417 7687 7623 7380 7288
Yes, we can appreciate that though the years more girls have been baptized (increasing).
plot(arbuthnot$year, arbuthnot$boys / (arbuthnot$boys + arbuthnot$girls)
, type = "l")
we can obserb that the number of boys have decrease over years.
head(present)
## year boys girls
## 1 1940 1211684 1148715
## 2 1941 1289734 1223693
## 3 1942 1444365 1364631
## 4 1943 1508959 1427901
## 5 1944 1435301 1359499
## 6 1945 1404587 1330869
present$year
## [1] 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
## [15] 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967
## [29] 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981
## [43] 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995
## [57] 1996 1997 1998 1999 2000 2001 2002
dim(present)
## [1] 63 3
names(present)
## [1] "year" "boys" "girls"
r dim(arbuthnot)
## [1] 82 3
r summary(arbuthnot)
## year boys girls ## Min. :1629 Min. :2890 Min. :2722 ## 1st Qu.:1649 1st Qu.:4759 1st Qu.:4457 ## Median :1670 Median :6073 Median :5718 ## Mean :1670 Mean :5907 Mean :5535 ## 3rd Qu.:1690 3rd Qu.:7576 3rd Qu.:7150 ## Max. :1710 Max. :8426 Max. :7779
r dim(present)
## [1] 63 3
r summary(present)
## year boys girls ## Min. :1940 Min. :1211684 Min. :1148715 ## 1st Qu.:1956 1st Qu.:1799857 1st Qu.:1711404 ## Median :1971 Median :1924868 Median :1831679 ## Mean :1971 Mean :1885600 Mean :1793915 ## 3rd Qu.:1986 3rd Qu.:2058524 3rd Qu.:1965538 ## Max. :2002 Max. :2186274 Max. :2082052
we see a differents in the number of observations.
plot(present$year , present$boys / present$girls, type = "l", xlab = "Year", ylab = "Boys/Girls Ratio", col="Blue")
we can obserb that the boys/girls ration habe been decreased over the year.
#max(present$boys + present$girls)
cat("The year with more births is:" , present$year[(present$boys + present$girls) ==
max(present$boys + present$girls)])
## The year with more births is: 1961