Howto Plot "Reverse" Cumulative Frequency Graph With ECDF
- by neversaint
I have no problem plotting the following cumulative frequency graph plot
like this.
library(Hmisc)
pre.test <- rnorm(100,50,10)
post.test <- rnorm(100,55,10)
x <- c(pre.test, post.test)
g <- c(rep('Pre',length(pre.test)),rep('Post',length(post.test)))
Ecdf(x, group=g, what="f", xlab='Test Results', label.curves=list(keys=1:2))
But I want to show the graph in forms of the "reverse" cumulative frequency of values x ?
(i.e. something equivalent to what="1-f").
Is there a way to do it?
Other suggestions in R other than using Hmisc are also very much welcomed.