【发布时间】:2011-08-06 10:36:47
【问题描述】:
我们正在尝试将一些表数据写入文件,但没有成功。
使用write.csv。
这是我们尝试的一些示例代码:
> <%
>
> X<-c(1:666)
>
> print(X)
>
> write.csv(X,"hh")
>
> %>
这是我们无法计算的 rapache 错误:
RApache Warning/Error!!!
Error in file(file, ifelse(append, "a", "w")) : cannot open the connection
RApache Warning/Error!!!
In addition:
RApache Warning/Error!!!
Warning messages:
RApache Warning/Error!!!
1: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step1_5.php'
RApache Warning/Error!!!
2: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step1_5.php'
RApache Warning/Error!!!
3: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step1_5.php'
RApache Warning/Error!!!
4: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/writefile.php'
RApache Warning/Error!!!
5: In file(file, ifelse(append, "a", "w")) : cannot open file 'hh': Permission denied
RApache Warning/Error!!!
函数 brew 返回 'try-error' 的对象。返回 HTTP 响应码 500。
如果有人可以为我们编写一个简单的示例或纠正我们的代码,那就太棒了。
谢谢,
Yoni & Tsvi。
【问题讨论】:
-
R 无法写入运行 R 的当前工作目录。整理您的权限,然后重试。
-
请不要交叉发帖!你已经在 RApache 邮件列表上问过同样的问题!
-
您的来源是否具有我在您的问题中看到的所有大于符号?那可能会把事情搞砸。看起来整个脚本都坏了,而不仅仅是 write.csv。