Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6719727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:07:37+00:00 2026-05-26T09:07:37+00:00

Just a warning, I started using R a day ago…my apologies if anything seems

  • 0

Just a warning, I started using R a day ago…my apologies if anything seems idiotically simple.

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.

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.

equation

a(t) is the aceleration curve.

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?

If not, is there another way to acomplish this task using a different function?

Any help or insighful comments would be very much appreciated.

Thanks in advance,

Wes

One more question though James, how can i just get the number without the text and error when using the integrate() function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:07:38+00:00Added an answer on May 26, 2026 at 9:07 am

    You can use the predict function on your loess model to create a function to use with integrate.

    # using the inbuilt dataset "pressure"
    plot(pressure,type="l")
    
    # create loess object and prediction function
    l <- loess(pressure~temperature,pressure)
    f <- function(x) predict(l,newdata=x)
    
    # perform integration
    integrate(f,0,360)
    40176.5 with absolute error < 4.6
    

    And to extract the value alone:

    integrate(f,0,360)$value
    [1] 40176.5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started using NDepend and am trying to analyse a solution. This warning
I just started using QT. Right now I need to transfer some code I
Warning: I just started learning bash recently and trying to do a recursive function
I just started using Razor instead of the WebForms-ViewEngine. Now in my Razor-View i
This build warning just started showing up. I'm building for 3.1.3. Not sure what
Just a warning: I'm completely new to Java and am trying to teach myself
I'm using XSLT and having great success, just got a couple of problems. Warning:
Right guys, I have just started getting into Xcode 4, with the intention to
I just started using JRuby and I create a small test file: require 'java'
I just started using eclipse for some personal projects and am finding the transition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.