I have some data that looks like the following. It is grouped by variable \"Year\" and I want to extract the percentiles of each observation of Score, with respect to t
Following up on Vince's solution, you can also do this with plyr or by:
plyr
by
ddply(df, .(years), function(x) transform(x, percentile=ecdf(x$scores)(x$scores)))