如何避免显示 plot Ecdf Hmisc?

How to avoid displaying plot Ecdf Hmisc?

我正在尝试做一些非常简单的事情:

我正在使用库 Hmisc 以便使用 Ecdf 函数来获取函数 returns 的 xy 值, 但即使我将其分配给变量,也会显示默认图。

library("Hmisc")
ecdf1 <- Ecdf(F) # Plot is displayed

如何避免显示图而只得到结果?

设置pl=FALSE

ecdf1 <- Ecdf(F, pl=FALSE) 

您可以从Ecdf帮助文件中阅读:

set to F to omit the plot, to just return estimates