gpt4 book ai didi

r - 阴谋无处

转载 作者:行者123 更新时间:2023-12-02 07:38:56 25 4
gpt4 key购买 nike

我正在使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com