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 8278381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:59:24+00:00 2026-06-08T08:59:24+00:00

I am new to R and stuck with one problem. I will explain it

  • 0

I am new to R and stuck with one problem. I will explain it by an example.

I am using R with php. I have one R script that calculates the linear regression:

reg_result <- lm( Y ~ A1 + A2 + A3, data=query_result)

And I am using the regression result reg_result for prediction like:

predict(reg_result, another_dataframe, interval="predict", level = 0.20)

It works very fine.

But my problem is that I need to use predict with reg_result in some time intervals, let say each 1 hour.

So is there any ways that I can persist the result of regression reg_result to use it later.

I have used RMySQL, but I dont know how to store the result of regression in mysql.

any help would be greatly appreciated.

And I can provide more details if required.

EDIT: Is it possible to store the R object in MySQL blob with RMySQL ? As I have googled and found Currently there are no facilities to import/export BLOBs. in RMySQL

  • 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-06-08T08:59:26+00:00Added an answer on June 8, 2026 at 8:59 am

    What I did (using RODBC, but that is a minor detail) is extract the regression coefficients from the lm object, something like this (for y~x):

    intercept = lm$coefficients[["(Intercept)"]]
    slope = lm$coefficients[["x"]])
    

    Then store these coefficients in a database table, and later just use a linear function with the values from the table to predict, instead of the predict method (like f <- function(x) { intercept + slope*x }).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very new to Php OOP and am getting stuck on one particular problem.
I'm new in python programming. just got stuck with this one problem. I have
I'm new to wicket and stuck with the following problem: I have a table
I am new to python and stuck on how to do that. I have
I'm trying to make iPhone-style EditText element on android. The one that will have
I`m new to sql and have been stuck on the following issue for almost
I am new to backbone and I am stuck with a problem problem in
I am stuck with a design problem that I hope you guys can help
I've been stuck with this problem for over a week now. Hopefully some one
I am using action stack in my ZF application. I will explain scenario over

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.