Can data accessed by web form (built in PHP) from MySQL, be analysed i R and publish the results on webpage?

kay weider
kay weider used Ask the Experts™
on
Greetings,
I have a situation where the data in my database is to be analysed and results are to be published on the web page, i built a web-form through which required data can be selected by the user, now this data should be send to R for some  analysis and results are needed to be published back on the  webpage,i have no idea how this can be done, i built the web app in PHP, with MySQL as database, any help will be appreciated,thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016
Commented:
I assume you mean this R.

Generally speaking, the answer is "yes," and the implementation details are what you need to be concerned with.  Any time you need server-to-server communication or app-to-app communication, you use an API to effect the communication.  In the modern world, we would use the HTTP protocol to send requests and receive responses.  Your PHP application would gather the data and put it into some format that would be suitable for R.  Then acting as the HTTP client, the PHP app would make a request to R, and receive a response from R.  The response would become the basis for publishing the information on your web page.

How the HTTP client/server protocols works:
https://www.experts-exchange.com/articles/11271/Understanding-Client-Server-Protocols-and-Web-Applications.html

How a RESTful API works:
https://www.experts-exchange.com/articles/12239/Introduction-to-Application-Programming-Interfaces.html

What looks like a good place to start understanding the R API(s):
https://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces
Most Valuable Expert 2011
Top Expert 2016

Commented:
stale question

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial