I'm not sure I understand the question, but does quantile() do what you want?
On Fri, Dec 23, 2011 at 10:28 AM, Steve Jones <sjone...@jhmi.edu> wrote: > I have a problem where I need to calculate the corresponding cohort > percentile ranks for each of several variables. > > Essentially, what I need is a function that will calculate the > distribution-free percentiles from each variable's data vector, returning a > corresponding vector of percentiles: > > e.g.: > > percentile.my.data<-/function/(my.data) > > > I tried to make ecdf() perform this task but was unsuccessful. > > I'd be grateful for any help or advice... > > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.