我有以下因素:
> str(prediction)
Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 2 1 1 ...
- attr(*, "names")= chr [1:9000] "1" "2" "3" "4" ...
我希望得到一个 9000 x 1 向量的 1 或 0 的 csv。
我试过了:
write.table(prediction, file = "prediction-1-Decision-Tree-08-Oct-2013.csv", sep = ",", col.names = NA, qmethod = "double")
但这给了我一个带有两列和标题的csv:
"","x"
"1","1"
"2","0"
"3","0"
"4","0"
"5","0"
etc.
我希望没有标题,只有一列。