powered by
take an ecdf object and invert it to get a step-quantile function
invert_ecdf(df)
stepfun object that contains the quantiles of the df
an ecdf object
y <- rnorm(100) F <- ecdf(y) Finv <- invert_ecdf(F) Finv(0.5) ## approximate median
Run the code above in your browser using DataLab