inst/snippet/mix-normals02.R

x <- seq(0,30,by=0.25)
density <- 0.3 * dnorm(x,8,2) + 0.7 * dnorm(x,16,3)
myplot <- xyplot(density~x,type="l", 
    main="pdf of a mixture of normals"
    )

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 2, 2019, 5:53 p.m.