我有一个R代码可以预测硬盘何时会满。在
$ duinfo <- read.table('duinfo.dat', colClasses=c("Date","numeric"), col.names=c("day","usd"))
$ attach(duinfo)
$ totalspace <- 500000
$ model <- lm(day ~ usd)
$ as.Date(predict(model, data.frame(usd = totalspace)), origin="1970-01-01")
我用python编写了以下代码来获取磁盘将满的预测日期,如下所示:
^{pr2}$如何使用rpy2将最后一条语句转换为python代码?在
我能够将代码转换为python:
相关问题 更多 >
编程相关推荐