plot(female/(male+female) ~ year, nzc, type = "b",
ylab = "Proportion", col = "blue", las = 1,
main = "Proportion of NZ Chinese that are female")
abline(h = 0.5, lty = "dashed")
plot(100*(male+female)/nz ~ year, nzc, type = "b", ylab = "Percent",
ylim = c(0, max(100*(male+female)/nz)), col = "blue", las = 1,
main = "Percent of NZers that are Chinese")
abline(h = 0, lty = "dashed")
Run the code above in your browser using DataLab