Php calls the R script implementation scheme

Source: Internet
Author: User
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.