【发布时间】:2014-09-15 14:45:17
【问题描述】:
这是我的 R 代码:
out = file('testfile')
write('hello', file=out, append=T)
write('world', file=out, append=T)
close(out)
当我运行它(使用 R 3.1.0)时,测试文件包含:
world
我预计:
hello
world
如果我使用cat() 而不是write(),也会发生同样的行为。为什么?如何附加到文件?
【问题讨论】: