R - Can't get ksmooth or the KernSmooth package to work
<p>I can't seem to get the ksmooth function or KernSmooth package to give me anything for the following example:</p>
<pre><code>x &lt;- 1:100
y &lt;- 3*sin(x/10)+rnorm(100)
plot(x,y)
</code></pre>
<p>Which looks like this:</p>
<p><a href="https://i.stack.imgur.com/RC2Bt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RC2Bt.jpg" alt="" /></a></p>

<p>The ksmooth function does nothing and just gives me back the same points. Using the KernSmooth package all I can seem to get is a linear approximation.</p>
<p>Why does <code>ksmooth(x,y,kernel=&quot;normal&quot;,bandwidth=0.5)</code> just give me back the same points? Also how do I use the KernSmooth package? Thanks.</p>