I have a vector with lots of different numbers. I need to make a graph
showing the Uniform Distribution of the figures. I have created a graph
showing all the different values, but now want individual Gaussian Kernel
round each point. This is what I have but each time it comes up with an
error as I have just based it on the Normal Distribution, but I'm not sure
what I need to change to make it work. Where z is my vector.

plot(0, 0, xlim=range(0, 300), ylim=range(0, 1), pch=NA,)
for(i in 1:length(z)) {
        points(z[i], 0, pch="|")
}

x = seq(-10, 10, 0.01)
for(i in 1:length(z)){
        std_dev = 1
        lines(x, dunif(x, z[i], sd = std_dev))
}

Any ideas? Thanks.

--
View this message in context: 
http://r.789695.n4.nabble.com/Uniform-Gaussian-Kernel-tp3495742p3495742.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to