with(nzc, plot(year, female/(male+female), type="b", ylab="Proportion",
main="Proportion of NZ Chinese that are female",
col="blue", las=1))
abline(h=0.5, lty="dashed")
with(nzc, plot(year, 100*(male+female)/nz, 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