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.
我在 RStudio 中运行分析并使用 sink 将输出存储在文件中,因为行数太大而无法从控制台手动复制它。代码是:
sink("filename.txt") ...analysis sink()
现在,我在哪里可以找到我机器上的 filename.txt 文件?
谢谢
如果其他人发现这篇文章,我建议您在接收器语句之前检查您的目录在哪里。
getwd()
以防万一那不是你想要的地方。
我还保留了一个默认的输出文件目标,并在我的 sink 语句之前设置了该目录,并在语句之后重定向。
自己找的,RStudio默认存储在我的文档下。