Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将输出重定向到某个 txt 文件,但是以这样的方式,以便我可以在控制台中同时看到该输出,同时逐步生成?
只需使用以下split=TRUE参数sink:
split=TRUE
sink
sink(file="myfile",split=TRUE)