title: Integrate nonparametric curve in R
body: <p>Just a warning, I started using R a day ago...my apologies if anything seems idiotically simple.</p>
  
  <p>Right now im trying to have R take in a .txt file with acelerometer data of an impact and calculate a Head injury criterion test for it. The HIC test requires that curve from the data be integrated on a certain interval. </p>
  
  <p>The equation is at the link below...i tried to insert it here as an image but it would not let me. Apparently i need some reputation points before it'll let me do that.</p>
  
  <p><img src="https://i.stack.imgur.com/jsoKa.png" alt="equation"></p>
  
  <p>a(t) is the aceleration curve. </p>
  
  <p>So far i have not had an issue generating a suitable curve in R to match the data. The loess function worked quite well, and is exactly the kind of thing i was looking for...i just have no idea how to integrate it. As far as i can tell, loess is a non-parametric regression so there is no way to determine the equation of the curve iteslf. Is there a way to integrate it though? </p>
  
  <p>If not, is there another way to acomplish this task using a different function?</p>
  
  <p>Any help or insighful comments would be very much appreciated. </p>
  
  <p>Thanks in advance,</p>
  
  <p>Wes</p>
  
  <p>One more question though James, how can i just get the number without the text and error when using the integrate() function?</p>