(no subject)
quantile(myvec, 0.9) See ?quantile for the 9 different empirical quantile methods provided. Michael
On Thu, May 3, 2012 at 2:20 PM, Drew Duckett <dduckett32 at gmail.com> wrote:
If i am not mistaking the quantile function and percentile function and the
same other than the way they are expressed in R. ?I think where I am losing
it is just how to express the function.
myvec<- c(5,4,3,2,1,10,9,8,7,6)
PercentileFinder<- function (vec,p){
sortedlist<- sort(vec)
count<- length(myvec) #length of the list??
i think i might be on the right track i am just not sure where to put my
percents in? any tips would be appreciated.
On Thu, May 3, 2012 at 1:02 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us>wrote:
This is the R-help list, not the do-your-work-for-you list. Please read the Posting Guide and: - use the approved support resources within your educational institution until you finish your class - use a sensible subject line - provide a self-contained example, at least showing how far you got before you got stuck - don't reinvent the wheel (once you have completed your class) --------------------------------------------------------------------------- Jeff Newmiller ? ? ? ? ? ? ? ? ? ? ? ?The ? ? ..... ? ? ? ..... ?Go Live... DCN:<jdnewmil at dcn.davis.ca.us> ? ? ? ?Basics: ##.#. ? ? ? ##.#. ?Live Go... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Live: ? OO#.. Dead: OO#.. ?Playing Research Engineer (Solar/Batteries ? ? ? ? ? ?O.O#. ? ? ? #.O#. ?with /Software/Embedded Controllers) ? ? ? ? ? ? ? .OO#. ? ? ? .OO#. ?rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Drew Duckett <dduckett32 at gmail.com> wrote:
Hi there I am new to R, and I was hoping you guys could help me out. ?I want to make a vector that is: vec(1,2,3,4,5,6,7,8,9,10) and i want to create a function called PercentileFinder, that if i plug in PercentileFinder (vec, .9) it will give me 9. ?Creating the function is my biggest hurdle please e-mail me back when you all get a chance. ?Thank you ? ? ? [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at 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.