## Use dtnorm and rtnorm with their default values
dtnorm()
rtnorm()
## A similar curve plotting example extracted from dnorm functions
plot(function(x) dnorm(x, log = FALSE), -2.5, 2.5,
main = "Normal Distribution", ylim=c(0,0.45), ylab="Density")
curve(dtnorm(x, lower=-2, upper=2), add=TRUE, col="tomato", lwd=2)
mtext("dnorm(x)", adj = 0)
mtext("dtnorm(x)", col = "tomato", adj = 1)
Run the code above in your browser using DataLab