Exercise 2 We can use help to find how to adjust the plot to meet our requirements. For
example, you can add a title to the x-axis using the additional argument xlab="year" Try this,
and also add an appropriate y-axis label and plot title. Provide your plot for the solution to
this exercise (you can use the ‘Export’ button in the graphics window). [4 Marks]
Exercise 3 Is there an apparent trend in the number of girls baptized over the years? [2 Marks]
#exercise 2
plot(x = arbuthnot$year, y = arbuthnot$girls, main="Baptism records for girls born in London 1629 to 1710",
xlab="year", ylab = "number of newborn girls",type="l")
Make the axis start at zero is good practice
plot(x = arbuthnot$year, y = arbuthnot$girls, main="Baptism records for girls born in London 1629 to 1710",
xlab="year", ylab = "number of newborn girls",type="l",ylim=c(0,10000))
Exercise 3 Is there an apparent trend in the number of girls baptized over the years? [2 Marks]
#exercise 2
plot(x = arbuthnot$year, y = arbuthnot$girls, main="Baptism records for girls born in London 1629 to 1710",
xlab="year", ylab = "number of newborn girls",type="l")
Make the axis start at zero is good practice
plot(x = arbuthnot$year, y = arbuthnot$girls, main="Baptism records for girls born in London 1629 to 1710",
xlab="year", ylab = "number of newborn girls",type="l",ylim=c(0,10000))
Exercise 4 Now, make a plot of the proportion of boys over time. What do you see? Tip: As
well as by using the ↑ and ↓ keys you can access your command history using the history tab
in the upper right panel. This might save you a lot of typing. [3 Marks]
#exercise 4
boygirlrat<-arbuthnot$boys/(arbuthnot$boys + arbuthnot$girls)
boygirlrat<-arbuthnot$boys/(arbuthnot$boys + arbuthnot$girls)
plot(arbuthnot$year, boygirlrat,type="l")
This chart looks exciting - the ratio of boys to girls is all over the place
But maybe not - it is just about 0.5 with bits of wiggling



