Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
R script llamando en PHP para el análisis estadístico en línea de los datos de entrada HTML

Después de las variables como $alldata; Escribí esto para llamar a un script R llamado rCommands

 echo "<p><pre>".print_r($allData, true)."</pre></p>"; echo "<p>Saving the received json into file dataReceived/input_".$timeStamp.".json</p>"; file_put_contents("dataReceived/input_".$timeStamp.".json", json_encode($allData)); echo "<p>Calling R code to compute min, mean, and max values</p>"; exec("Rscript rCommands.txt ".$timeStamp); echo "<p>Parsing the result dataReceived/output_".$timeStamp.".json of the R code</p>"; $result = json_decode(file_get_contents("dataReceived/output_".$timeStamp.".json"), true); echo "<p>Result: ".print_r($result, true)."</p>";```

Aquí el código R en el que quiero obtener un marco de datos y luego usarlo para el análisis estadístico

 library("RJSONIO") args = commandArgs(trailingOnly=TRUE) if (length(args) != 1) { stop("Exactly one argument must be supplied (timestamp).n", call.=FALSE) } allData<- fromJSON(paste("dataReceived/input_", args[1], ".json", sep = "")) data= as.data.frame(allData) x <- toJSON(data) fileConn<-file(paste("dataReceived/output_", args[1], ".json", sep = "")) writeLines(x, fileConn) close(fileConn)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!