<?php 
    require_once 'config.php';
    require '/../Connection.php';
    $r = new Rserve_Connection(RSERVE_HOST);
    $r->evalString("df=('new1.csv')");
    $r->evalString("values<-df$TOTAL_PURCHASE");
    $r->evalString("s1<-ts(values,frequency=1)");
    $r->evalString("library(forecast)");
    $r->evalString("f1<-auto.arima(s1)");
    $r->evalString("f2<-forecast(f1)");
    $r->evalString("plot(f2,main="PURCHASE PREDICTIONS")");
    $r->close();
?>

My main doubt is because I am plotting a graph inside the script and not just displaying values. I am unable to test it out because of some restrictions and any feedback along with reasons would be deeply appreciated.

0

There are 0 answers