刚接触R和PHP的人尝试将表单数据重定向到R脚本

刚接触R和PHP的人尝试将表单数据重定向到R脚本,php,html,r,post,machine-learning,Php,Html,R,Post,Machine Learning,我有一个用于调查的表格,我想做的是,每当用户填写表格时,收集的数据都应该作为CSV传递给R纸条。我尝试了很多解决方案,但都没有成功 我已经厌倦了使用exec()命令和shell_exec() formaction=“scr.php”method=“GET”> 请选择下面的选项 在过去的20天里,你多久吃一次 对做事没有兴趣或乐趣 一点也不 有时 几天 超过一半的时间 几乎每天 #src.php文件 库(插入符号) 图书馆(dplyr) 库('度量') 图书馆(e1071) 德福乌干管 f

我有一个用于调查的表格,我想做的是,每当用户填写表格时,收集的数据都应该作为CSV传递给R纸条。我尝试了很多解决方案,但都没有成功

我已经厌倦了使用exec()命令和shell_exec()

formaction=“scr.php”method=“GET”>
请选择下面的选项

在过去的20天里,你多久吃一次 对做事没有兴趣或乐趣 一点也不
有时
几天
超过一半的时间
几乎每天

#src.php文件
库(插入符号)
图书馆(dplyr)
库('度量')
图书馆(e1071)
德福乌干管
form action="scr.php" method="GET">

<h2>please select the option below</h2>
<hr>
<h2>In the past 20 days how often have you have</h2>

<h2>Little interest or pleasure in doing things</h2>
  <input type="radio" name="Pleasure" value=" Not at all"> Not at all<br>
  <input type="radio" name="Pleasure" value="Sometimes">Sometimes<br>
  <input type="radio" name="Pleasure" value="Several days">Several days<br>
  <input type="radio" name="Pleasure" value="More than half the days">More than half the days<br>
  <input type="radio" name="Pleasure" value="Nearly everyday">Nearly everyday<br>
<p><input type='submit' name='submit' value='Submit'></p> 
</form>
library(caret)
library(dplyr)
library('Metrics')
library(e1071)

df_main <- read.csv("entries.csv", sep = ',', header = TRUE)