your data is called bdims not dims...
also its not clear what the 0 is intending to achieve ?
I generally prefer ggplot2 to base plotting.
like:
library(tidyverse)
(info_of_interest <- select(bdims,
hgt,sex))
ggplot(data=info_of_interest) +
aes(x=hgt,color=sex,fill=sex) +
geom_histogram(bins = 25)