我正在尝试使用包 MASS 中的 boxcox 函数创建一个绘图。
但它正在创建一个 rapache 错误。
r 代码:
<%
csvDF<- read.csv(GET$name1, header=TRUE)
a<-lm(csvDF[,GET$col_variable]~1)
require(MASS)
filename1 <- paste(tempfile(tmpdir='/var/www/images'), '.png', sep='')
png(filename1)
bx<-boxcox(a)
dev.off()
%>
**GET$name1 是 csv 数据文件地址。**GET$col_variable 是变量列。
当我丢失“bx<-boxcox(a)”行时,错误消失了,所以我猜是 boxcox 导致了错误。
以下是 rapache 错误:
RApache Warning/Error!!!
Error in eval(expr, envir, enclos) : object 'csvDF' not found
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/step5_box_cox.php'
RApache Warning/Error!!!
2: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step5_box_cox.php'
RApache Warning/Error!!!
3: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step5_box_cox.php'
RApache Warning/Error!!!
4: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step5_box_cox.php'
RApache Warning/Error!!!
5: In readLines(icon, 1) : incomplete final line found on '/var/www/brew/sampleplan/step5_box_cox.php'
RApache Warning/Error!!!
Function brew returned an object of 'try-error'. Returning HTTP response code 500.
我将不胜感激任何建议。