Suppose that we have the vector $x = (11,10,5,14,10,10,16,9,13,10)$ we wish to adjust a kernel density $f$ to f where the Kernel(K) is a uniform(a,b) density.
I understand that we can write $f(x) = \frac{1}{nh}\sum_{i=1}^n K(\frac{x-x_i}{h})$ where the Kernel is a uniform(a,b) density. However I do not know how to proceed afterwards, I do not know how to construct the grid from where x comes from and where the $h$ is obtained from.
P.S. (I have done it in R though i wish to understand what R is doing)