if(require("graphics")) {
curve(kernelGaussian, xlim = c(-4.5, 4.5), ylim = c(0, 0.45))
curve(kernelLogistic, add = TRUE, col = "red")
curve(kernelUniform, add = TRUE, col = "blue", lwd=2, n = 5000)
}
Run the code above in your browser using DataLab