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]]
Take a look at the quantile function. You can view help by typing ?quantile at the prompt and get interactive examples by typing example(quantile) Michael On Wed, May 2, 2012 at 7:42 PM, 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.
?quantile HTH, Jorge.- On Wed, May 2, 2012 at 7:42 PM, Drew Duckett <> 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@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]]
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.