title: Perform Loess smoothing in R by ID?
body: <p>I have time-series data on multiple individuals:</p>
  
  <pre><code>ID Day Weight
  1 1 334
  1 2 339
  1 3 342
  1 4 339
  2 1 332
  2 2 334
  2 3 338
  2 4 341
  </code></pre>
  
  <p>How can I get the Loess smoothed results by ID? Running Loess smoothing on a single individual:</p>
  
  <pre><code>mod &lt;- loess(Weight ~ Day, data=test, span=0.18)
  
  smoothed &lt;- predict(mod)
  </code></pre>