: This article mainly introduces the php script implementation solution for calling R. For more information about PHP tutorials, see. Because php web pages inevitably require the powerful functions of the R language. Therefore, we need the R language to implement some mathematical functions. The specific method is to use the php system function to call the R script to run the R script. you can use the php file to obtain the R script execution result. The basic code is as follows:
System ("F: \ R \ R-3.2.3 \ bin \ R.exe -- vanilla
Because it is implemented on the windows platform, as long as the script command can be run on the cmd console, you can use system () in php.
Note:
(1) ensure that the system path contains no Chinese characters or spaces
(2) to configure the R language environment in advance, add the path F: \ R \ R-3.2.3 \ bin in path
The above describes the php script implementation scheme for calling R, including some content, and hope to be helpful to friends who are interested in PHP tutorials.