Re: [R] generating ordered, random decimal fractions

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Sat, 12 Jun 2010 10:45:20 -0600

I must be missing something; can't you just use, e.g., one of:

  sort(round(runif(10), 3))

  sort(sample(1000, 10, TRUE)/1000)

?

   -Peter Ehlers

On 2010-06-12 7:49, Kurt_Helf_at_nps.gov wrote:
> Greetings
> How do I do this in R? Checking the Cran site produces a bewildering array
> of packages that I can't seem to find to load. Surely the main program has
> this function?
> Cheers
> Kurt
>
> ***************************************************************
> Kurt Lewis Helf, Ph.D.
> Invertebrate Ecologist
> National Park Service
> Cumberland Piedmont Network
> P.O. Box 8
> Mammoth Cave, KY 42259
> Ph: 270-758-2163
> Lab: 270-758-2151
> Fax: 270-758-2609
> ****************************************************************
> Science, in constantly seeking real explanations, reveals the true majesty
> of our world in all its complexity.
> -Richard Dawkins
>
> The scientific tradition is distinguished from the pre-scientific tradition
> in having two layers. Like the latter it passes on its theories but it
> also passes on a critical attitude towards them. The theories are passed
> on not as dogmas but rather with the challenge to discuss them and improve
> upon them.
> -Karl Popper
>
> ...consider yourself a guest in the home of other creatures as significant
> as yourself.
> -Wayside at Wilderness Threshold in McKittrick Canyon, Guadalupe Mountains
> National Park, TX
>
> Cumberland Piedmont Network Forest Pest Monitoring Website
> http://science.nature.nps.gov/im/units/cupn/monitor/forestpest/forest_pests.cfm
>
>
> Cumberland Piedmont Network Cave Cricket Monitoring Website:
> http://science.nature.nps.gov/im/units/cupn/monitor/cavecrickets/cavecrickets.cfm
>



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. Received on Sat 12 Jun 2010 - 16:47:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Jun 2010 - 17:20:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive