I can't honestly say that I grasp what you're trying to do, but that
said, I wonder if the curve() function will help you?
Cheers
Andrew
On Wed, May 04, 2011 at 07:30:20AM -0700, blutack wrote:> 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 at 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.
--
Andrew Robinson
Program Manager, ACERA
Department of Mathematics and Statistics Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia (prefer email)
http://www.ms.unimelb.edu.au/~andrewpr Fax: +61-3-8344-4599
http://www.acera.unimelb.edu.au/
Forest Analytics with R (Springer, 2011)
http://www.ms.unimelb.edu.au/FAwR/
Introduction to Scientific Programming and Simulation using R (CRC, 2009):
http://www.ms.unimelb.edu.au/spuRs/