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.
这是我使用的代码:
library(ggplot2) pdf('testplot.pdf') qplot(1:10, 2:11, geom=c('point', 'line')) dev.off()
如果我将这些输入到 R 会话中,一切都很好,但是如果我将这些行保存到文件test.R中,然后获取它,则 pdf 文件将为空。非常令人费解。
test.R