drr.io/r/base/factor.html'>factor</a></span>(<span class='no'>gender</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"Male"</span>, <span class='st'>"NB"</span>, <span class='st'>"Female"</span>)),
  <span class='kw'>ill</span> <span class='kw'>=</span> <span class='no'>ill</span>,
  <span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)

<span class='co'># Create the age pyramid, stratifying by sex</span>
<span class