我正在使用 limma
包的函数 plotMDS()
,它通过 R 的简单 plot()
格式绘制图,并且还返回图上点的位置作为输出。我想使用 plotMDS()
的输出来制作我自己的美丽情节。
有什么方法可以运行 plotMDS()
而不真正生成它的绘图?我这样问的原因是我已经将输出转换为 PDF 文件并且我不希望 plotMDS()
的原始图在那里!
最佳答案
感谢@BenBolker,可以这样做:
pdf("Some file")
...
dev.new() # Putting new plots to nowhere
mds <- plotMDS(data)
dev.off() # Restoring new plots to the PDF file
plot(...) # Making the desired plot using mds
...
dev.off() # Closing PDF file
关于r - 阴谋无处,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13299263/