\begin{Schunk}
\begin{Sinput}
 dat$totnum <- dat$nummen + dat$numwomen
 dat$totnum[dat$totnum > 99] <- NA  #exclude liars and prostitutes
 par(mfcol=c(1,2))
 datmale <- dat[dat$sex %in% levels(dat$sex)[1], ]
 hist(datmale$totnum, prob=TRUE, xlab="Total sexual partners (Male + Female)", main="Respondents: Male")
 datfemale <- dat[dat$sex %in% levels(dat$sex)[2], ]
 hist(datfemale$totnum,  prob=TRUE, xlab="Total sexual partners (Male + Female)", main="Respondents: Female")
 par(mfcol=c(1,1))
\end{Sinput}
\end{Schunk}
