将结果输出到R中的txt文件

时间:2014-08-31 04:27:59

标签: r io

我使用插入符号训练模型来预测给定的未知函数。 训练的结果由一个物体给出。我想将内容打印到txt文件。 我已根据之前的帖子中的建议尝试了writewrite as.data.frame(do.call(cbind, rfFitcv))但我收到了错误消息。

如果我使用write

Error in cat(list(...), file, sep, fill, labels, append) : 
  argument 1 (type 'list') cannot be handled by 'cat'

我使用as.data.frame(do.call(cbind, rfFitcv))

Error in e$fun(obj, substitute(ex), parent.frame(), e$data) : 
  worker initialization failed: list(RMSE = 0.0017183195625996, Rsquared = 0.78840117007247, mtry = 1, Resample = "Fold05.Rep08")NULL

如果我只输入rfFitcv,请输入:

Random Forest 

348 samples
 34 predictor

No pre-processing
Resampling: Cross-Validated (10 fold, repeated 10 times) 

Summary of sample sizes: 313, 314, 314, 312, 312, 314, ... 

Resampling results

  RMSE     Rsquared  RMSE SD   Rsquared SD
  0.00188  0.854     0.000485  0.102      

Tuning parameter 'mtry' was held constant at a value of 1

0 个答案:

没有答案