{
require(ggplot2)
curve(dnorm(x, mean=0, sd=1), from=-4, to = 4, n= 1001)
ggplot(gcurve(expr = dnorm(x, mean=0, sd=1),from=-4, to = 4, n= 1001,
category= "Standard Normal"), aes(x=x, y=y)) + geom_line()
}
Run the code above in your browser using DataLab