It's like a Histogram, but smoothed out
hist(pData$AGEP, breaks=12, col="red", prob=T) dens = density(pData$AGEP, adjust=2) lines(dens, col="blue", lwd=2)
dens = density(pData$AGEP) plot(dens, lwd=3, col="blue")
densM = density(pData$AGEP[which(pData$SEX==1)]) densF = density(pData$AGEP[which(pData$SEX==2)]) plot(densM, lwd=3, col="blue") lines(densF, lwd=3, col="orange")