Используя предложение Мусы:
pre.ecdf <- ecdf(pre.test)
post.ecdf <- ecdf(post.test)
r <- range(pre.test,post.test)
curve(1-pre.ecdf(x), from=r[1], to=r[2], col="red", xlim=r)
curve(1-post.ecdf(x), from=r[1], to=r[2], col="blue", add=TRUE)
![Proportions](https://imgur.com/M3L50.png)
Вы можете установить некоторые параметры, такие как заголовок, легенда и т. Д.
Если вы хотите, чтобы частота вместо пропорции простое решение будет:
pre.ecdf <- ecdf(pre.test)
post.ecdf <- ecdf(post.test)
rx <- range(pre.test,post.test)
ry <- max(length(pre.test),length(post.test))
curve(length(pre.test)*(1-pre.ecdf(x)), from=rx[1], to=rx[2], col="red", xlim=rx, ylim=c(0,ry))
curve(length(post.test)*(1-post.ecdf(x)), from=rx[1], to=rx[2], col="blue", add=TRUE)
![Frequencies](https://imgur.com/G11NU.png)